diff --git a/.golangci.yml b/.golangci.yml index 1b46338dc..158243565 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -34,6 +34,8 @@ linters: importas: no-unaliased: true alias: + - pkg: github.com/VictoriaMetrics/operator/api/operator/v1alpha1 + alias: vmv1alpha1 - pkg: github.com/VictoriaMetrics/operator/api/operator/v1beta1 alias: vmv1beta1 - pkg: github.com/VictoriaMetrics/operator/api/operator/v1 diff --git a/Makefile b/Makefile index e80f1cacc..6bd252bb5 100644 --- a/Makefile +++ b/Makefile @@ -84,9 +84,10 @@ help: ## Display this help. ##@ Development .PHONY: manifests -manifests: controller-gen kustomize ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. +manifests: controller-gen yq kustomize ## Generate WebhookConfiguration, ClusterRole and CustomResourceDefinition objects. $(CONTROLLER_GEN) rbac:roleName=manager-role crd webhook paths="./..." output:crd:artifacts:config=config/crd/bases $(KUSTOMIZE) build config/crd > config/crd/overlay/crd.yaml + $(YQ) -r 'del(.. | .description?)' -i config/crd/overlay/crd.yaml $(KUSTOMIZE) build config/crd-specless > config/crd/overlay/crd.specless.yaml .PHONY: generate @@ -105,6 +106,7 @@ api-gen: client-gen lister-gen informer-gen --output-pkg github.com/VictoriaMetrics/operator/api/client \ --output-dir ./api/client \ --go-header-file hack/boilerplate.go.txt \ + --input github.com/VictoriaMetrics/operator/api/operator/v1alpha1 \ --input github.com/VictoriaMetrics/operator/api/operator/v1beta1 \ --input github.com/VictoriaMetrics/operator/api/operator/v1 @echo ">> generating with lister-gen" diff --git a/PROJECT b/PROJECT index cbdbea245..75a45baa1 100644 --- a/PROJECT +++ b/PROJECT @@ -273,4 +273,13 @@ resources: webhooks: validation: true webhookVersion: v1 +- api: + crdVersion: v1 + namespaced: true + controller: true + domain: victoriametrics.com + group: operator + kind: VMDistributedCluster + path: github.com/VictoriaMetrics/operator/api/operator/v1alpha1 + version: v1alpha1 version: "3" diff --git a/api/.golangci.yml b/api/.golangci.yml index 0228b60ea..e987463e3 100644 --- a/api/.golangci.yml +++ b/api/.golangci.yml @@ -34,6 +34,8 @@ linters: importas: no-unaliased: true alias: + - pkg: github.com/VictoriaMetrics/operator/api/operator/v1alpha1 + alias: vmv1alpha1 - pkg: github.com/VictoriaMetrics/operator/api/operator/v1beta1 alias: vmv1beta1 - pkg: github.com/VictoriaMetrics/operator/api/operator/v1 diff --git a/api/client/informers/externalversions/generic.go b/api/client/informers/externalversions/generic.go index e43340fab..f21d0d0b6 100644 --- a/api/client/informers/externalversions/generic.go +++ b/api/client/informers/externalversions/generic.go @@ -21,6 +21,7 @@ import ( fmt "fmt" v1 "github.com/VictoriaMetrics/operator/api/operator/v1" + v1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" v1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" schema "k8s.io/apimachinery/pkg/runtime/schema" cache "k8s.io/client-go/tools/cache" @@ -66,6 +67,10 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource case v1.SchemeGroupVersion.WithResource("vtsingles"): return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1().VTSingles().Informer()}, nil + // Group=operator, Version=v1alpha1 + case v1alpha1.SchemeGroupVersion.WithResource("vmdistributedclusters"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1alpha1().VMDistributedClusters().Informer()}, nil + // Group=operator, Version=v1beta1 case v1beta1.SchemeGroupVersion.WithResource("vlogs"): return &genericInformer{resource: resource.GroupResource(), informer: f.Operator().V1beta1().VLogs().Informer()}, nil diff --git a/api/client/informers/externalversions/operator/interface.go b/api/client/informers/externalversions/operator/interface.go index 06459b942..017cc3d2e 100644 --- a/api/client/informers/externalversions/operator/interface.go +++ b/api/client/informers/externalversions/operator/interface.go @@ -20,6 +20,7 @@ package operator import ( internalinterfaces "github.com/VictoriaMetrics/operator/api/client/informers/externalversions/internalinterfaces" v1 "github.com/VictoriaMetrics/operator/api/client/informers/externalversions/operator/v1" + v1alpha1 "github.com/VictoriaMetrics/operator/api/client/informers/externalversions/operator/v1alpha1" v1beta1 "github.com/VictoriaMetrics/operator/api/client/informers/externalversions/operator/v1beta1" ) @@ -27,6 +28,8 @@ import ( type Interface interface { // V1 provides access to shared informers for resources in V1. V1() v1.Interface + // V1alpha1 provides access to shared informers for resources in V1alpha1. + V1alpha1() v1alpha1.Interface // V1beta1 provides access to shared informers for resources in V1beta1. V1beta1() v1beta1.Interface } @@ -47,6 +50,11 @@ func (g *group) V1() v1.Interface { return v1.New(g.factory, g.namespace, g.tweakListOptions) } +// V1alpha1 returns a new v1alpha1.Interface. +func (g *group) V1alpha1() v1alpha1.Interface { + return v1alpha1.New(g.factory, g.namespace, g.tweakListOptions) +} + // V1beta1 returns a new v1beta1.Interface. func (g *group) V1beta1() v1beta1.Interface { return v1beta1.New(g.factory, g.namespace, g.tweakListOptions) diff --git a/api/client/informers/externalversions/operator/v1alpha1/interface.go b/api/client/informers/externalversions/operator/v1alpha1/interface.go new file mode 100644 index 000000000..dc29943ad --- /dev/null +++ b/api/client/informers/externalversions/operator/v1alpha1/interface.go @@ -0,0 +1,44 @@ +/* + + +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 informer-gen-v0.32. DO NOT EDIT. + +package v1alpha1 + +import ( + internalinterfaces "github.com/VictoriaMetrics/operator/api/client/informers/externalversions/internalinterfaces" +) + +// Interface provides access to all the informers in this group version. +type Interface interface { + // VMDistributedClusters returns a VMDistributedClusterInformer. + VMDistributedClusters() VMDistributedClusterInformer +} + +type version struct { + factory internalinterfaces.SharedInformerFactory + namespace string + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// New returns a new Interface. +func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { + return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} +} + +// VMDistributedClusters returns a VMDistributedClusterInformer. +func (v *version) VMDistributedClusters() VMDistributedClusterInformer { + return &vMDistributedClusterInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} +} diff --git a/api/client/informers/externalversions/operator/v1alpha1/vmdistributedcluster.go b/api/client/informers/externalversions/operator/v1alpha1/vmdistributedcluster.go new file mode 100644 index 000000000..f901963fb --- /dev/null +++ b/api/client/informers/externalversions/operator/v1alpha1/vmdistributedcluster.go @@ -0,0 +1,89 @@ +/* + + +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 informer-gen-v0.32. DO NOT EDIT. + +package v1alpha1 + +import ( + context "context" + time "time" + + internalinterfaces "github.com/VictoriaMetrics/operator/api/client/informers/externalversions/internalinterfaces" + operatorv1alpha1 "github.com/VictoriaMetrics/operator/api/client/listers/operator/v1alpha1" + versioned "github.com/VictoriaMetrics/operator/api/client/versioned" + apioperatorv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// VMDistributedClusterInformer provides access to a shared informer and lister for +// VMDistributedClusters. +type VMDistributedClusterInformer interface { + Informer() cache.SharedIndexInformer + Lister() operatorv1alpha1.VMDistributedClusterLister +} + +type vMDistributedClusterInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc + namespace string +} + +// NewVMDistributedClusterInformer constructs a new informer for VMDistributedCluster type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewVMDistributedClusterInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredVMDistributedClusterInformer(client, namespace, resyncPeriod, indexers, nil) +} + +// NewFilteredVMDistributedClusterInformer constructs a new informer for VMDistributedCluster type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredVMDistributedClusterInformer(client versioned.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + &cache.ListWatch{ + ListFunc: func(options v1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.OperatorV1alpha1().VMDistributedClusters(namespace).List(context.TODO(), options) + }, + WatchFunc: func(options v1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.OperatorV1alpha1().VMDistributedClusters(namespace).Watch(context.TODO(), options) + }, + }, + &apioperatorv1alpha1.VMDistributedCluster{}, + resyncPeriod, + indexers, + ) +} + +func (f *vMDistributedClusterInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredVMDistributedClusterInformer(client, f.namespace, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *vMDistributedClusterInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&apioperatorv1alpha1.VMDistributedCluster{}, f.defaultInformer) +} + +func (f *vMDistributedClusterInformer) Lister() operatorv1alpha1.VMDistributedClusterLister { + return operatorv1alpha1.NewVMDistributedClusterLister(f.Informer().GetIndexer()) +} diff --git a/api/client/listers/operator/v1alpha1/expansion_generated.go b/api/client/listers/operator/v1alpha1/expansion_generated.go new file mode 100644 index 000000000..467871bf6 --- /dev/null +++ b/api/client/listers/operator/v1alpha1/expansion_generated.go @@ -0,0 +1,26 @@ +/* + + +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 lister-gen-v0.32. DO NOT EDIT. + +package v1alpha1 + +// VMDistributedClusterListerExpansion allows custom methods to be added to +// VMDistributedClusterLister. +type VMDistributedClusterListerExpansion interface{} + +// VMDistributedClusterNamespaceListerExpansion allows custom methods to be added to +// VMDistributedClusterNamespaceLister. +type VMDistributedClusterNamespaceListerExpansion interface{} diff --git a/api/client/listers/operator/v1alpha1/vmdistributedcluster.go b/api/client/listers/operator/v1alpha1/vmdistributedcluster.go new file mode 100644 index 000000000..187614fa3 --- /dev/null +++ b/api/client/listers/operator/v1alpha1/vmdistributedcluster.go @@ -0,0 +1,69 @@ +/* + + +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 lister-gen-v0.32. DO NOT EDIT. + +package v1alpha1 + +import ( + operatorv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" +) + +// VMDistributedClusterLister helps list VMDistributedClusters. +// All objects returned here must be treated as read-only. +type VMDistributedClusterLister interface { + // List lists all VMDistributedClusters in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*operatorv1alpha1.VMDistributedCluster, err error) + // VMDistributedClusters returns an object that can list and get VMDistributedClusters. + VMDistributedClusters(namespace string) VMDistributedClusterNamespaceLister + VMDistributedClusterListerExpansion +} + +// vMDistributedClusterLister implements the VMDistributedClusterLister interface. +type vMDistributedClusterLister struct { + listers.ResourceIndexer[*operatorv1alpha1.VMDistributedCluster] +} + +// NewVMDistributedClusterLister returns a new VMDistributedClusterLister. +func NewVMDistributedClusterLister(indexer cache.Indexer) VMDistributedClusterLister { + return &vMDistributedClusterLister{listers.New[*operatorv1alpha1.VMDistributedCluster](indexer, operatorv1alpha1.Resource("vmdistributedcluster"))} +} + +// VMDistributedClusters returns an object that can list and get VMDistributedClusters. +func (s *vMDistributedClusterLister) VMDistributedClusters(namespace string) VMDistributedClusterNamespaceLister { + return vMDistributedClusterNamespaceLister{listers.NewNamespaced[*operatorv1alpha1.VMDistributedCluster](s.ResourceIndexer, namespace)} +} + +// VMDistributedClusterNamespaceLister helps list and get VMDistributedClusters. +// All objects returned here must be treated as read-only. +type VMDistributedClusterNamespaceLister interface { + // List lists all VMDistributedClusters in the indexer for a given namespace. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*operatorv1alpha1.VMDistributedCluster, err error) + // Get retrieves the VMDistributedCluster from the indexer for a given namespace and name. + // Objects returned here must be treated as read-only. + Get(name string) (*operatorv1alpha1.VMDistributedCluster, error) + VMDistributedClusterNamespaceListerExpansion +} + +// vMDistributedClusterNamespaceLister implements the VMDistributedClusterNamespaceLister +// interface. +type vMDistributedClusterNamespaceLister struct { + listers.ResourceIndexer[*operatorv1alpha1.VMDistributedCluster] +} diff --git a/api/client/versioned/clientset.go b/api/client/versioned/clientset.go index 5634229c7..5f8460540 100644 --- a/api/client/versioned/clientset.go +++ b/api/client/versioned/clientset.go @@ -22,6 +22,7 @@ import ( http "net/http" operatorv1 "github.com/VictoriaMetrics/operator/api/client/versioned/typed/operator/v1" + operatorv1alpha1 "github.com/VictoriaMetrics/operator/api/client/versioned/typed/operator/v1alpha1" operatorv1beta1 "github.com/VictoriaMetrics/operator/api/client/versioned/typed/operator/v1beta1" discovery "k8s.io/client-go/discovery" rest "k8s.io/client-go/rest" @@ -30,6 +31,7 @@ import ( type Interface interface { Discovery() discovery.DiscoveryInterface + OperatorV1alpha1() operatorv1alpha1.OperatorV1alpha1Interface OperatorV1beta1() operatorv1beta1.OperatorV1beta1Interface OperatorV1() operatorv1.OperatorV1Interface } @@ -37,8 +39,14 @@ type Interface interface { // Clientset contains the clients for groups. type Clientset struct { *discovery.DiscoveryClient - operatorV1beta1 *operatorv1beta1.OperatorV1beta1Client - operatorV1 *operatorv1.OperatorV1Client + operatorV1alpha1 *operatorv1alpha1.OperatorV1alpha1Client + operatorV1beta1 *operatorv1beta1.OperatorV1beta1Client + operatorV1 *operatorv1.OperatorV1Client +} + +// OperatorV1alpha1 retrieves the OperatorV1alpha1Client +func (c *Clientset) OperatorV1alpha1() operatorv1alpha1.OperatorV1alpha1Interface { + return c.operatorV1alpha1 } // OperatorV1beta1 retrieves the OperatorV1beta1Client @@ -95,6 +103,10 @@ func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, var cs Clientset var err error + cs.operatorV1alpha1, err = operatorv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) + if err != nil { + return nil, err + } cs.operatorV1beta1, err = operatorv1beta1.NewForConfigAndClient(&configShallowCopy, httpClient) if err != nil { return nil, err @@ -124,6 +136,7 @@ func NewForConfigOrDie(c *rest.Config) *Clientset { // New creates a new Clientset for the given RESTClient. func New(c rest.Interface) *Clientset { var cs Clientset + cs.operatorV1alpha1 = operatorv1alpha1.New(c) cs.operatorV1beta1 = operatorv1beta1.New(c) cs.operatorV1 = operatorv1.New(c) diff --git a/api/client/versioned/fake/clientset_generated.go b/api/client/versioned/fake/clientset_generated.go index 83bc8a0dc..ffac5c415 100644 --- a/api/client/versioned/fake/clientset_generated.go +++ b/api/client/versioned/fake/clientset_generated.go @@ -21,6 +21,8 @@ import ( clientset "github.com/VictoriaMetrics/operator/api/client/versioned" operatorv1 "github.com/VictoriaMetrics/operator/api/client/versioned/typed/operator/v1" fakeoperatorv1 "github.com/VictoriaMetrics/operator/api/client/versioned/typed/operator/v1/fake" + operatorv1alpha1 "github.com/VictoriaMetrics/operator/api/client/versioned/typed/operator/v1alpha1" + fakeoperatorv1alpha1 "github.com/VictoriaMetrics/operator/api/client/versioned/typed/operator/v1alpha1/fake" operatorv1beta1 "github.com/VictoriaMetrics/operator/api/client/versioned/typed/operator/v1beta1" fakeoperatorv1beta1 "github.com/VictoriaMetrics/operator/api/client/versioned/typed/operator/v1beta1/fake" "k8s.io/apimachinery/pkg/runtime" @@ -84,6 +86,11 @@ var ( _ testing.FakeClient = &Clientset{} ) +// OperatorV1alpha1 retrieves the OperatorV1alpha1Client +func (c *Clientset) OperatorV1alpha1() operatorv1alpha1.OperatorV1alpha1Interface { + return &fakeoperatorv1alpha1.FakeOperatorV1alpha1{Fake: &c.Fake} +} + // OperatorV1beta1 retrieves the OperatorV1beta1Client func (c *Clientset) OperatorV1beta1() operatorv1beta1.OperatorV1beta1Interface { return &fakeoperatorv1beta1.FakeOperatorV1beta1{Fake: &c.Fake} diff --git a/api/client/versioned/fake/register.go b/api/client/versioned/fake/register.go index 27ccc664c..7db8dd7da 100644 --- a/api/client/versioned/fake/register.go +++ b/api/client/versioned/fake/register.go @@ -19,6 +19,7 @@ package fake import ( operatorv1 "github.com/VictoriaMetrics/operator/api/operator/v1" + operatorv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" operatorv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -31,6 +32,7 @@ var scheme = runtime.NewScheme() var codecs = serializer.NewCodecFactory(scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + operatorv1alpha1.AddToScheme, operatorv1beta1.AddToScheme, operatorv1.AddToScheme, } diff --git a/api/client/versioned/scheme/register.go b/api/client/versioned/scheme/register.go index 51ffa581f..cfdf3290f 100644 --- a/api/client/versioned/scheme/register.go +++ b/api/client/versioned/scheme/register.go @@ -19,6 +19,7 @@ package scheme import ( operatorv1 "github.com/VictoriaMetrics/operator/api/operator/v1" + operatorv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" operatorv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" @@ -31,6 +32,7 @@ var Scheme = runtime.NewScheme() var Codecs = serializer.NewCodecFactory(Scheme) var ParameterCodec = runtime.NewParameterCodec(Scheme) var localSchemeBuilder = runtime.SchemeBuilder{ + operatorv1alpha1.AddToScheme, operatorv1beta1.AddToScheme, operatorv1.AddToScheme, } diff --git a/api/client/versioned/typed/operator/v1alpha1/doc.go b/api/client/versioned/typed/operator/v1alpha1/doc.go new file mode 100644 index 000000000..5a5746f7a --- /dev/null +++ b/api/client/versioned/typed/operator/v1alpha1/doc.go @@ -0,0 +1,19 @@ +/* + + +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 client-gen-v0.32. DO NOT EDIT. + +// This package has the automatically generated typed clients. +package v1alpha1 diff --git a/api/client/versioned/typed/operator/v1alpha1/fake/doc.go b/api/client/versioned/typed/operator/v1alpha1/fake/doc.go new file mode 100644 index 000000000..288d80faa --- /dev/null +++ b/api/client/versioned/typed/operator/v1alpha1/fake/doc.go @@ -0,0 +1,19 @@ +/* + + +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 client-gen-v0.32. DO NOT EDIT. + +// Package fake has the automatically generated clients. +package fake diff --git a/api/client/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go b/api/client/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go new file mode 100644 index 000000000..17d86e0a5 --- /dev/null +++ b/api/client/versioned/typed/operator/v1alpha1/fake/fake_operator_client.go @@ -0,0 +1,39 @@ +/* + + +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 client-gen-v0.32. DO NOT EDIT. + +package fake + +import ( + v1alpha1 "github.com/VictoriaMetrics/operator/api/client/versioned/typed/operator/v1alpha1" + rest "k8s.io/client-go/rest" + testing "k8s.io/client-go/testing" +) + +type FakeOperatorV1alpha1 struct { + *testing.Fake +} + +func (c *FakeOperatorV1alpha1) VMDistributedClusters(namespace string) v1alpha1.VMDistributedClusterInterface { + return newFakeVMDistributedClusters(c, namespace) +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *FakeOperatorV1alpha1) RESTClient() rest.Interface { + var ret *rest.RESTClient + return ret +} diff --git a/api/client/versioned/typed/operator/v1alpha1/fake/fake_vmdistributedcluster.go b/api/client/versioned/typed/operator/v1alpha1/fake/fake_vmdistributedcluster.go new file mode 100644 index 000000000..8cc66e39b --- /dev/null +++ b/api/client/versioned/typed/operator/v1alpha1/fake/fake_vmdistributedcluster.go @@ -0,0 +1,51 @@ +/* + + +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 client-gen-v0.32. DO NOT EDIT. + +package fake + +import ( + operatorv1alpha1 "github.com/VictoriaMetrics/operator/api/client/versioned/typed/operator/v1alpha1" + v1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" + gentype "k8s.io/client-go/gentype" +) + +// fakeVMDistributedClusters implements VMDistributedClusterInterface +type fakeVMDistributedClusters struct { + *gentype.FakeClientWithList[*v1alpha1.VMDistributedCluster, *v1alpha1.VMDistributedClusterList] + Fake *FakeOperatorV1alpha1 +} + +func newFakeVMDistributedClusters(fake *FakeOperatorV1alpha1, namespace string) operatorv1alpha1.VMDistributedClusterInterface { + return &fakeVMDistributedClusters{ + gentype.NewFakeClientWithList[*v1alpha1.VMDistributedCluster, *v1alpha1.VMDistributedClusterList]( + fake.Fake, + namespace, + v1alpha1.SchemeGroupVersion.WithResource("vmdistributedclusters"), + v1alpha1.SchemeGroupVersion.WithKind("VMDistributedCluster"), + func() *v1alpha1.VMDistributedCluster { return &v1alpha1.VMDistributedCluster{} }, + func() *v1alpha1.VMDistributedClusterList { return &v1alpha1.VMDistributedClusterList{} }, + func(dst, src *v1alpha1.VMDistributedClusterList) { dst.ListMeta = src.ListMeta }, + func(list *v1alpha1.VMDistributedClusterList) []*v1alpha1.VMDistributedCluster { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1alpha1.VMDistributedClusterList, items []*v1alpha1.VMDistributedCluster) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, + } +} diff --git a/api/client/versioned/typed/operator/v1alpha1/generated_expansion.go b/api/client/versioned/typed/operator/v1alpha1/generated_expansion.go new file mode 100644 index 000000000..e02daf638 --- /dev/null +++ b/api/client/versioned/typed/operator/v1alpha1/generated_expansion.go @@ -0,0 +1,20 @@ +/* + + +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 client-gen-v0.32. DO NOT EDIT. + +package v1alpha1 + +type VMDistributedClusterExpansion interface{} diff --git a/api/client/versioned/typed/operator/v1alpha1/operator_client.go b/api/client/versioned/typed/operator/v1alpha1/operator_client.go new file mode 100644 index 000000000..f00ff0398 --- /dev/null +++ b/api/client/versioned/typed/operator/v1alpha1/operator_client.go @@ -0,0 +1,106 @@ +/* + + +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 client-gen-v0.32. DO NOT EDIT. + +package v1alpha1 + +import ( + http "net/http" + + scheme "github.com/VictoriaMetrics/operator/api/client/versioned/scheme" + operatorv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" + rest "k8s.io/client-go/rest" +) + +type OperatorV1alpha1Interface interface { + RESTClient() rest.Interface + VMDistributedClustersGetter +} + +// OperatorV1alpha1Client is used to interact with features provided by the operator group. +type OperatorV1alpha1Client struct { + restClient rest.Interface +} + +func (c *OperatorV1alpha1Client) VMDistributedClusters(namespace string) VMDistributedClusterInterface { + return newVMDistributedClusters(c, namespace) +} + +// NewForConfig creates a new OperatorV1alpha1Client for the given config. +// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), +// where httpClient was generated with rest.HTTPClientFor(c). +func NewForConfig(c *rest.Config) (*OperatorV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + httpClient, err := rest.HTTPClientFor(&config) + if err != nil { + return nil, err + } + return NewForConfigAndClient(&config, httpClient) +} + +// NewForConfigAndClient creates a new OperatorV1alpha1Client for the given config and http client. +// Note the http client provided takes precedence over the configured transport values. +func NewForConfigAndClient(c *rest.Config, h *http.Client) (*OperatorV1alpha1Client, error) { + config := *c + if err := setConfigDefaults(&config); err != nil { + return nil, err + } + client, err := rest.RESTClientForConfigAndClient(&config, h) + if err != nil { + return nil, err + } + return &OperatorV1alpha1Client{client}, nil +} + +// NewForConfigOrDie creates a new OperatorV1alpha1Client for the given config and +// panics if there is an error in the config. +func NewForConfigOrDie(c *rest.Config) *OperatorV1alpha1Client { + client, err := NewForConfig(c) + if err != nil { + panic(err) + } + return client +} + +// New creates a new OperatorV1alpha1Client for the given RESTClient. +func New(c rest.Interface) *OperatorV1alpha1Client { + return &OperatorV1alpha1Client{c} +} + +func setConfigDefaults(config *rest.Config) error { + gv := operatorv1alpha1.SchemeGroupVersion + config.GroupVersion = &gv + config.APIPath = "/apis" + config.NegotiatedSerializer = rest.CodecFactoryForGeneratedClient(scheme.Scheme, scheme.Codecs).WithoutConversion() + + if config.UserAgent == "" { + config.UserAgent = rest.DefaultKubernetesUserAgent() + } + + return nil +} + +// RESTClient returns a RESTClient that is used to communicate +// with API server by this client implementation. +func (c *OperatorV1alpha1Client) RESTClient() rest.Interface { + if c == nil { + return nil + } + return c.restClient +} diff --git a/api/client/versioned/typed/operator/v1alpha1/vmdistributedcluster.go b/api/client/versioned/typed/operator/v1alpha1/vmdistributedcluster.go new file mode 100644 index 000000000..1b1f991ee --- /dev/null +++ b/api/client/versioned/typed/operator/v1alpha1/vmdistributedcluster.go @@ -0,0 +1,69 @@ +/* + + +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 client-gen-v0.32. DO NOT EDIT. + +package v1alpha1 + +import ( + context "context" + + scheme "github.com/VictoriaMetrics/operator/api/client/versioned/scheme" + operatorv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" +) + +// VMDistributedClustersGetter has a method to return a VMDistributedClusterInterface. +// A group's client should implement this interface. +type VMDistributedClustersGetter interface { + VMDistributedClusters(namespace string) VMDistributedClusterInterface +} + +// VMDistributedClusterInterface has methods to work with VMDistributedCluster resources. +type VMDistributedClusterInterface interface { + Create(ctx context.Context, vMDistributedCluster *operatorv1alpha1.VMDistributedCluster, opts v1.CreateOptions) (*operatorv1alpha1.VMDistributedCluster, error) + Update(ctx context.Context, vMDistributedCluster *operatorv1alpha1.VMDistributedCluster, opts v1.UpdateOptions) (*operatorv1alpha1.VMDistributedCluster, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, vMDistributedCluster *operatorv1alpha1.VMDistributedCluster, opts v1.UpdateOptions) (*operatorv1alpha1.VMDistributedCluster, error) + Delete(ctx context.Context, name string, opts v1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error + Get(ctx context.Context, name string, opts v1.GetOptions) (*operatorv1alpha1.VMDistributedCluster, error) + List(ctx context.Context, opts v1.ListOptions) (*operatorv1alpha1.VMDistributedClusterList, error) + Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *operatorv1alpha1.VMDistributedCluster, err error) + VMDistributedClusterExpansion +} + +// vMDistributedClusters implements VMDistributedClusterInterface +type vMDistributedClusters struct { + *gentype.ClientWithList[*operatorv1alpha1.VMDistributedCluster, *operatorv1alpha1.VMDistributedClusterList] +} + +// newVMDistributedClusters returns a VMDistributedClusters +func newVMDistributedClusters(c *OperatorV1alpha1Client, namespace string) *vMDistributedClusters { + return &vMDistributedClusters{ + gentype.NewClientWithList[*operatorv1alpha1.VMDistributedCluster, *operatorv1alpha1.VMDistributedClusterList]( + "vmdistributedclusters", + c.RESTClient(), + scheme.ParameterCodec, + namespace, + func() *operatorv1alpha1.VMDistributedCluster { return &operatorv1alpha1.VMDistributedCluster{} }, + func() *operatorv1alpha1.VMDistributedClusterList { return &operatorv1alpha1.VMDistributedClusterList{} }, + ), + } +} diff --git a/api/operator/v1alpha1/groupversion_info.go b/api/operator/v1alpha1/groupversion_info.go new file mode 100644 index 000000000..c26200d15 --- /dev/null +++ b/api/operator/v1alpha1/groupversion_info.go @@ -0,0 +1,44 @@ +/* + + +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. +*/ + +// Package v1alpha1 contains API Schema definitions for the operator v1alpha1 API group. +// +kubebuilder:object:generate=true +// +groupName=operator.victoriametrics.com +package v1alpha1 + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/controller-runtime/pkg/scheme" +) + +var ( + // GroupVersion is group version used to register these objects. + GroupVersion = schema.GroupVersion{Group: "operator.victoriametrics.com", Version: "v1alpha1"} + + // SchemeBuilder is used to add go types to the GroupVersionKind scheme. + SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} + + // AddToScheme adds the types in this group-version to the given scheme. + AddToScheme = SchemeBuilder.AddToScheme + + // SchemeGroupVersion is group version used to register these objects + SchemeGroupVersion = schema.GroupVersion{Group: "operator.victoriametrics.com", Version: "v1alpha1"} +) + +// Resource takes an unqualified resource and returns a Group qualified GroupResource +func Resource(resource string) schema.GroupResource { + return SchemeGroupVersion.WithResource(resource).GroupResource() +} diff --git a/api/operator/v1alpha1/vmdistributedcluster_types.go b/api/operator/v1alpha1/vmdistributedcluster_types.go new file mode 100644 index 000000000..70a5b526b --- /dev/null +++ b/api/operator/v1alpha1/vmdistributedcluster_types.go @@ -0,0 +1,458 @@ +/* + + +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. +*/ + +package v1alpha1 + +import ( + "encoding/json" + "fmt" + + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/utils/ptr" + "sigs.k8s.io/controller-runtime/pkg/client" + + vmv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" +) + +// VMDistributedClusterSpec defines the desired state of VMDistributedClusterSpec +// +k8s:openapi-gen=true +type VMDistributedClusterSpec struct { + // ParsingError contents error with context if operator was failed to parse json object from kubernetes api server + ParsingError string `json:"-" yaml:"-"` + // ReadyDeadline is the deadline for the VMCluster to be ready. + // +optional + ReadyDeadline *metav1.Duration `json:"readyDeadline,omitempty"` + // VMAgentFlushDeadline is the deadline for VMAgent to flush accumulated queue. + // +optional + VMAgentFlushDeadline *metav1.Duration `json:"vmAgentFlushDeadline,omitempty"` + // ZoneUpdatePause is the time the operator should wait between zone updates to ensure a smooth transition. + // +optional + ZoneUpdatePause *metav1.Duration `json:"zoneUpdatePause,omitempty"` + // VMAgent is the name and spec of the VM agent to balance traffic between VMClusters. + VMAgent VMAgentNameAndSpec `json:"vmagent,omitempty"` + // VMAuth is a VMAuth definition (name + optional spec) that acts as a proxy for the VMUsers created by the operator. + // Use an inline spec to define a VMAuth object in-place or provide a name to reference an existing VMAuth. + VMAuth VMAuthNameAndSpec `json:"vmauth,omitempty"` + // Zones is a list of VMCluster instances to update. Each VMCluster in the list represents a "zone" within the distributed cluster. + Zones ZoneSpec `json:"zones,omitempty"` + // ClusterVersion defines expected image tag for all components. + + // Paused If set to true all actions on the underlying managed objects are not + // going to be performed, except for delete actions. + // +optional + Paused bool `json:"paused,omitempty"` +} + +// +k8s:openapi-gen=true +// ZoneSpec is a list of VMCluster instances to update. +type ZoneSpec struct { + // GlobalOverrideSpec specifies an override to all VMClusters. + // These overrides are applied to the referenced object if `Ref` is specified. + // +kubebuilder:validation:Type=object + // +kubebuilder:validation:XPreserveUnknownFields + // +optional + GlobalOverrideSpec *apiextensionsv1.JSON `json:"globalOverrideSpec,omitempty"` + + // Each VMClusterRefOrSpec is either defining a new inline VMCluster or referencing an existing one. + VMClusters []VMClusterRefOrSpec `json:"vmclusters,omitempty"` +} + +// +k8s:openapi-gen=true +// VMClusterRefOrSpec is either a reference to existing VMCluster or a specification of a new VMCluster. +// +kubebuilder:validation:Xor=Ref,Spec +type VMClusterRefOrSpec struct { + // Ref points to the VMCluster object. + // If Ref is specified, Name and Spec are ignored. + // +optional + Ref *corev1.LocalObjectReference `json:"ref,omitempty"` + + // OverrideSpec specifies an override to the VMClusterSpec of the referenced object. + // This override is applied to the referenced object if `Ref` is specified. + // This field is ignored if `Spec` is specified. + // +kubebuilder:validation:Type=object + // +kubebuilder:validation:XPreserveUnknownFields + // +optional + OverrideSpec *apiextensionsv1.JSON `json:"overrideSpec,omitempty"` + + // Name specifies the static name to be used for the VMCluster when Spec is provided. + // This field is ignored if `Ref` is specified. + // +optional + Name string `json:"name,omitempty"` + // Spec defines the desired state of a new VMCluster. + // This field is ignored if `Ref` is specified. + // +optional + Spec *vmv1beta1.VMClusterSpec `json:"spec,omitempty"` +} + +// +k8s:openapi-gen=true +// VMAgentNameAndSpec is a name and a specification of a new VMAgent. +type VMAgentNameAndSpec struct { + // Name specifies the static name to be used for the VMAgent when Spec is provided. + // +optional + Name string `json:"name,omitempty"` + // Spec defines the desired state of a new VMAgent. + // Note that RemoteWrite and RemoteWriteSettings are ignored as its managed by the operator. + // +optional + Spec *CustomVMAgentSpec `json:"spec,omitempty"` + // Optional tenant ID. Only required with the OAuth authentication method. + // +optional + TenantID *string `json:"tenantID,omitempty"` +} + +// +k8s:openapi-gen=true +// CustomVMAgentSpec is a customized specification of a new VMAgent. +// It includes selected options from the original VMAgentSpec. +type CustomVMAgentSpec struct { + // ParsingError contents error with context if operator was failed to parse json object from kubernetes api server + ParsingError string `json:"-" yaml:"-"` + // PodMetadata configures Labels and Annotations which are propagated to the vmagent pods. + // +optional + PodMetadata *vmv1beta1.EmbeddedObjectMetadata `json:"podMetadata,omitempty"` + // ManagedMetadata defines metadata that will be added to the all objects + // created by operator for the given CustomResource + ManagedMetadata *vmv1beta1.ManagedObjectsMetadata `json:"managedMetadata,omitempty"` + // LogLevel for VMAgent to be configured with. + // INFO, WARN, ERROR, FATAL, PANIC + // +optional + // +kubebuilder:validation:Enum=INFO;WARN;ERROR;FATAL;PANIC + LogLevel string `json:"logLevel,omitempty"` + // LogFormat for VMAgent to be configured with. + // +optional + // +kubebuilder:validation:Enum=default;json + LogFormat string `json:"logFormat,omitempty"` + + // RemoteWrite list of victoria metrics /some other remote write system + // for vm it must looks like: http://victoria-metrics-single:8428/api/v1/write + // or for cluster different url + // https://docs.victoriametrics.com/victoriametrics/vmagent/#splitting-data-streams-among-multiple-systems + // +optional + RemoteWrite []CustomVMAgentRemoteWriteSpec `json:"remoteWrite"` + // RemoteWriteSettings defines global settings for all remoteWrite urls. + // +optional + RemoteWriteSettings *vmv1beta1.VMAgentRemoteWriteSettings `json:"remoteWriteSettings,omitempty"` + + // ShardCount - numbers of shards of VMAgent + // in this case operator will use 1 deployment/sts per shard with + // replicas count according to spec.replicas, + // see [here](https://docs.victoriametrics.com/victoriametrics/vmagent/#scraping-big-number-of-targets) + // +optional + ShardCount *int `json:"shardCount,omitempty"` + + // UpdateStrategy - overrides default update strategy. + // works only for deployments, statefulset always use OnDelete. + // +kubebuilder:validation:Enum=Recreate;RollingUpdate + // +optional + UpdateStrategy *appsv1.DeploymentStrategyType `json:"updateStrategy,omitempty"` + // RollingUpdate - overrides deployment update params. + // +optional + RollingUpdate *appsv1.RollingUpdateDeployment `json:"rollingUpdate,omitempty"` + // PodDisruptionBudget created by operator + // +optional + PodDisruptionBudget *vmv1beta1.EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"` + *vmv1beta1.EmbeddedProbes `json:",inline"` + // DaemonSetMode enables DaemonSet deployment mode instead of Deployment. + // Supports only VMPodScrape + // (available from v0.55.0). + // Cannot be used with statefulMode + // +optional + DaemonSetMode bool `json:"daemonSetMode,omitempty"` + // StatefulMode enables StatefulSet for `VMAgent` instead of Deployment + // it allows using persistent storage for vmagent's persistentQueue + // +optional + StatefulMode bool `json:"statefulMode,omitempty"` + // StatefulStorage configures storage for StatefulSet + // +optional + StatefulStorage *vmv1beta1.StorageSpec `json:"statefulStorage,omitempty"` + // StatefulRollingUpdateStrategy allows configuration for strategyType + // set it to RollingUpdate for disabling operator statefulSet rollingUpdate + // +optional + StatefulRollingUpdateStrategy appsv1.StatefulSetUpdateStrategyType `json:"statefulRollingUpdateStrategy,omitempty"` + // PersistentVolumeClaimRetentionPolicy allows configuration of PVC retention policy + // +optional + PersistentVolumeClaimRetentionPolicy *appsv1.StatefulSetPersistentVolumeClaimRetentionPolicy `json:"persistentVolumeClaimRetentionPolicy,omitempty"` + // ClaimTemplates allows adding additional VolumeClaimTemplates for VMAgent in StatefulMode + ClaimTemplates []corev1.PersistentVolumeClaim `json:"claimTemplates,omitempty"` + + // License allows to configure license key to be used for enterprise features. + // Using license key is supported starting from VictoriaMetrics v1.94.0. + // See [here](https://docs.victoriametrics.com/victoriametrics/enterprise/) + // +optional + License *vmv1beta1.License `json:"license,omitempty"` + + // ServiceAccountName is the name of the ServiceAccount to use to run the pods + // +optional + ServiceAccountName string `json:"serviceAccountName,omitempty"` + + vmv1beta1.VMAgentSecurityEnforcements `json:",inline"` + vmv1beta1.CommonDefaultableParams `json:",inline,omitempty"` + vmv1beta1.CommonConfigReloaderParams `json:",inline,omitempty"` + vmv1beta1.CommonApplicationDeploymentParams `json:",inline,omitempty"` +} + +// CustomVMAgentRemoteWriteSpec is a copy of VMAgentRemoteWriteSpec, but allows empty URLs +// These urls will be overwritten by the controller +// +k8s:openapi-gen=true +type CustomVMAgentRemoteWriteSpec struct { + // URL is the URL of the remote write system. + // +optional + URL string `json:"url,omitempty"` + // BasicAuth allow an endpoint to authenticate over basic authentication + // +optional + BasicAuth *vmv1beta1.BasicAuth `json:"basicAuth,omitempty"` + // Optional bearer auth token to use for -remoteWrite.url + // +optional + BearerTokenSecret *corev1.SecretKeySelector `json:"bearerTokenSecret,omitempty"` + + // OAuth2 defines auth configuration + // +optional + OAuth2 *vmv1beta1.OAuth2 `json:"oauth2,omitempty"` + // TLSConfig describes tls configuration for remote write target + // +optional + TLSConfig *vmv1beta1.TLSConfig `json:"tlsConfig,omitempty"` + // Timeout for sending a single block of data to -remoteWrite.url (default 1m0s) + // +optional + // +kubebuilder:validation:Pattern:="[0-9]+(ms|s|m|h)" + SendTimeout *string `json:"sendTimeout,omitempty"` + // Headers allow configuring custom http headers + // Must be in form of semicolon separated header with value + // e.g. + // headerName: headerValue + // vmagent supports since 1.79.0 version + // +optional + Headers []string `json:"headers,omitempty"` + + // MaxDiskUsage defines the maximum file-based buffer size in bytes for the given remoteWrite + // It overrides global configuration defined at remoteWriteSettings.maxDiskUsagePerURL + // +optional + // +kubebuilder:validation:Schemaless + // +kubebuilder:pruning:PreserveUnknownFields + MaxDiskUsage *vmv1beta1.BytesString `json:"maxDiskUsage,omitempty"` + // ForceVMProto forces using VictoriaMetrics protocol for sending data to -remoteWrite.url + // +optional + ForceVMProto bool `json:"forceVMProto,omitempty"` + // ProxyURL for -remoteWrite.url. Supported proxies: http, https, socks5. Example: socks5://proxy:1234 + // +optional + ProxyURL *string `json:"proxyURL,omitempty"` + // AWS describes params specific to AWS cloud + AWS *vmv1beta1.AWS `json:"aws,omitempty"` +} + +// +k8s:openapi-gen=true +// VMAuthNameAndSpec defines a VMAuth by name or inline spec +type VMAuthNameAndSpec struct { + // Name specifies the static name to be used for the VMAuthNameAndSpec when Spec is provided. + // +optional + Name string `json:"name,omitempty"` + // Spec defines the desired state of a new VMAuth. + // +optional + Spec *vmv1beta1.VMAuthLoadBalancerSpec `json:"spec,omitempty"` +} + +// +k8s:openapi-gen=true +// VMDistributedClusterStatus defines the observed state of VMDistributedClusterStatus +type VMDistributedClusterStatus struct { + vmv1beta1.StatusMetadata `json:",inline"` +} + +// +operator-sdk:gen-csv:customresourcedefinitions.displayName="VMDistributedCluster App" +// +operator-sdk:gen-csv:customresourcedefinitions.resources="Deployment,apps" +// +operator-sdk:gen-csv:customresourcedefinitions.resources="Service,v1" +// +operator-sdk:gen-csv:customresourcedefinitions.resources="Secret,v1" +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +genclient +// +kubebuilder:object:root=true +// +k8s:openapi-gen=true +// +kubebuilder:subresource:status +// +kubebuilder:resource:path=vmdistributedclusters,scope=Namespaced +// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.updateStatus",description="current status of update rollout" +// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +// VMDistributedClusterSpec is progressively rolling out updates to multiple VMClusters. +type VMDistributedCluster struct { + metav1.TypeMeta `json:",inline"` + + // metadata is a standard object metadata + // +optional + metav1.ObjectMeta `json:"metadata,omitempty,omitzero"` + + // spec defines the desired state of VMDistributedCluster + // +required + Spec VMDistributedClusterSpec `json:"spec"` + + // status defines the observed state of VMDistributedCluster + // +optional + Status VMDistributedClusterStatus `json:"status,omitempty,omitzero"` + + // ParsedLastAppliedSpec contains last-applied configuration spec + ParsedLastAppliedSpec *VMDistributedClusterSpec `json:"-" yaml:"-"` +} + +// SelectorLabels defines selector labels for given component kind +func (cr *VMDistributedCluster) SelectorLabels(kind vmv1beta1.ClusterComponent) map[string]string { + return vmv1beta1.ClusterSelectorLabels(kind, cr.Name, "vmd") +} + +// PrefixedName returns prefixed name for the given component kind +func (cr *VMDistributedCluster) PrefixedName(kind vmv1beta1.ClusterComponent) string { + return vmv1beta1.ClusterPrefixedName(kind, cr.Name, "vmd", false) +} + +// FinalLabels adds cluster labels to the base labels and filters by prefix if needed +func (cr *VMDistributedCluster) FinalLabels(kind vmv1beta1.ClusterComponent) map[string]string { + return vmv1beta1.AddClusterLabels(cr.SelectorLabels(kind), "vmd") +} + +// AnnotationsFiltered returns global annotations to be applied by objects generate for vmcluster +func (cr *VMDistributedCluster) AnnotationsFiltered() map[string]string { + return map[string]string{} +} + +// AsOwner returns owner references with current object as owner +func (cr *VMDistributedCluster) AsOwner() metav1.OwnerReference { + return metav1.OwnerReference{ + APIVersion: cr.APIVersion, + Kind: cr.Kind, + Name: cr.Name, + UID: cr.UID, + Controller: ptr.To(true), + BlockOwnerDeletion: ptr.To(true), + } +} + +// PodLabels returns pod labels for given component kind +func (cr *VMDistributedCluster) PodLabels(kind vmv1beta1.ClusterComponent) map[string]string { + selectorLabels := cr.SelectorLabels(kind) + podMetadata := cr.PodMetadata(kind) + if podMetadata == nil { + return selectorLabels + } + return labels.Merge(podMetadata.Labels, selectorLabels) +} + +func (cr *VMDistributedCluster) GetVMAuthSpec() *vmv1beta1.VMAuthLoadBalancerSpec { + if cr == nil { + return nil + } + spec := cr.Spec.VMAuth.Spec + if spec == nil { + spec = &vmv1beta1.VMAuthLoadBalancerSpec{ + CommonDefaultableParams: vmv1beta1.CommonDefaultableParams{}, + } + } + return spec +} + +// PodMetadata returns pod metadata for given component kind +func (cr *VMDistributedCluster) PodMetadata(kind vmv1beta1.ClusterComponent) *vmv1beta1.EmbeddedObjectMetadata { + return cr.Spec.VMAuth.Spec.PodMetadata +} + +// FinalAnnotations returns global annotations to be applied by objects generate for vmcluster +func (cr *VMDistributedCluster) FinalAnnotations() map[string]string { + return map[string]string{} +} + +// GetAdditionalService returns AdditionalServiceSpec settings +func (cr *VMDistributedCluster) GetAdditionalService(kind vmv1beta1.ClusterComponent) *vmv1beta1.AdditionalServiceSpec { + return nil +} + +// GetServiceAccountName returns service account name for all vmcluster components +func (cr *VMDistributedCluster) GetServiceAccountName() string { + return cr.PrefixedName(vmv1beta1.ClusterComponentRoot) +} + +// PodAnnotations returns pod annotations for given component kind +func (cr *VMDistributedCluster) PodAnnotations(kind vmv1beta1.ClusterComponent) map[string]string { + podMetadata := cr.PodMetadata(kind) + if podMetadata == nil { + return nil + } + return podMetadata.Annotations +} + +func (cr *VMDistributedCluster) IsOwnsServiceAccount() bool { + return false +} + +// PrefixedInternalName returns prefixed name for the given component kind +func (cr *VMDistributedCluster) PrefixedInternalName(kind vmv1beta1.ClusterComponent) string { + return vmv1beta1.ClusterPrefixedName(kind, cr.Name, "vmd", true) +} + +// PrefixedInternalName returns prefixed name for the given component kind +func (cr *VMDistributedCluster) AllLabels() map[string]string { + return cr.SelectorLabels(vmv1beta1.ClusterComponentBalancer) +} + +// +kubebuilder:object:root=true + +// VMDistributedClusterList contains a list of VMDistributedCluster +type VMDistributedClusterList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []VMDistributedCluster `json:"items"` +} + +func init() { + SchemeBuilder.Register(&VMDistributedCluster{}, &VMDistributedClusterList{}) +} + +// GetStatus implements reconcile.ObjectWithDeepCopyAndStatus interface +func (cr *VMDistributedCluster) GetStatus() *VMDistributedClusterStatus { + return &cr.Status +} + +// DefaultStatusFields implements reconcile.ObjectWithDeepCopyAndStatus interface +func (cr *VMDistributedCluster) DefaultStatusFields(vs *VMDistributedClusterStatus) { +} + +// GetStatusMetadata returns metadata for object status +func (cr *VMDistributedClusterStatus) GetStatusMetadata() *vmv1beta1.StatusMetadata { + return &cr.StatusMetadata +} + +// LastAppliedSpecAsPatch return last applied cluster spec as patch annotation +func (cr *VMDistributedCluster) LastAppliedSpecAsPatch() (client.Patch, error) { + return vmv1beta1.LastAppliedChangesAsPatch(cr.Spec) +} + +// HasSpecChanges compares spec with last applied cluster spec stored in annotation +func (cr *VMDistributedCluster) HasSpecChanges() (bool, error) { + return vmv1beta1.HasStateChanges(cr.ObjectMeta, cr.Spec) +} + +// Paused checks if resource reconcile should be paused +func (cr *VMDistributedCluster) Paused() bool { + return cr.Spec.Paused +} + +func (cr *VMDistributedCluster) GetVMUserName() string { + return fmt.Sprintf("%s-user", cr.Name) +} + +// UnmarshalJSON implements json.Unmarshaler interface +func (cr *VMDistributedClusterSpec) UnmarshalJSON(src []byte) error { + type pcr VMDistributedClusterSpec + if err := json.Unmarshal(src, (*pcr)(cr)); err != nil { + cr.ParsingError = fmt.Sprintf("cannot parse vmdistributedcluster spec: %s, err: %s", string(src), err) + return nil + } + return nil +} diff --git a/api/operator/v1alpha1/zz_generated.deepcopy.go b/api/operator/v1alpha1/zz_generated.deepcopy.go new file mode 100644 index 000000000..a245a000a --- /dev/null +++ b/api/operator/v1alpha1/zz_generated.deepcopy.go @@ -0,0 +1,393 @@ +//go:build !ignore_autogenerated + +/* + + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Code generated by controller-gen. DO NOT EDIT. + +package v1alpha1 + +import ( + "github.com/VictoriaMetrics/operator/api/operator/v1beta1" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" +) + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomVMAgentRemoteWriteSpec) DeepCopyInto(out *CustomVMAgentRemoteWriteSpec) { + *out = *in + if in.BasicAuth != nil { + in, out := &in.BasicAuth, &out.BasicAuth + *out = new(v1beta1.BasicAuth) + (*in).DeepCopyInto(*out) + } + if in.BearerTokenSecret != nil { + in, out := &in.BearerTokenSecret, &out.BearerTokenSecret + *out = new(corev1.SecretKeySelector) + (*in).DeepCopyInto(*out) + } + if in.OAuth2 != nil { + in, out := &in.OAuth2, &out.OAuth2 + *out = new(v1beta1.OAuth2) + (*in).DeepCopyInto(*out) + } + if in.TLSConfig != nil { + in, out := &in.TLSConfig, &out.TLSConfig + *out = new(v1beta1.TLSConfig) + (*in).DeepCopyInto(*out) + } + if in.SendTimeout != nil { + in, out := &in.SendTimeout, &out.SendTimeout + *out = new(string) + **out = **in + } + if in.Headers != nil { + in, out := &in.Headers, &out.Headers + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.MaxDiskUsage != nil { + in, out := &in.MaxDiskUsage, &out.MaxDiskUsage + *out = new(v1beta1.BytesString) + **out = **in + } + if in.ProxyURL != nil { + in, out := &in.ProxyURL, &out.ProxyURL + *out = new(string) + **out = **in + } + if in.AWS != nil { + in, out := &in.AWS, &out.AWS + *out = new(v1beta1.AWS) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomVMAgentRemoteWriteSpec. +func (in *CustomVMAgentRemoteWriteSpec) DeepCopy() *CustomVMAgentRemoteWriteSpec { + if in == nil { + return nil + } + out := new(CustomVMAgentRemoteWriteSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomVMAgentSpec) DeepCopyInto(out *CustomVMAgentSpec) { + *out = *in + if in.PodMetadata != nil { + in, out := &in.PodMetadata, &out.PodMetadata + *out = new(v1beta1.EmbeddedObjectMetadata) + (*in).DeepCopyInto(*out) + } + if in.ManagedMetadata != nil { + in, out := &in.ManagedMetadata, &out.ManagedMetadata + *out = new(v1beta1.ManagedObjectsMetadata) + (*in).DeepCopyInto(*out) + } + if in.RemoteWrite != nil { + in, out := &in.RemoteWrite, &out.RemoteWrite + *out = make([]CustomVMAgentRemoteWriteSpec, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.RemoteWriteSettings != nil { + in, out := &in.RemoteWriteSettings, &out.RemoteWriteSettings + *out = new(v1beta1.VMAgentRemoteWriteSettings) + (*in).DeepCopyInto(*out) + } + if in.ShardCount != nil { + in, out := &in.ShardCount, &out.ShardCount + *out = new(int) + **out = **in + } + if in.UpdateStrategy != nil { + in, out := &in.UpdateStrategy, &out.UpdateStrategy + *out = new(appsv1.DeploymentStrategyType) + **out = **in + } + if in.RollingUpdate != nil { + in, out := &in.RollingUpdate, &out.RollingUpdate + *out = new(appsv1.RollingUpdateDeployment) + (*in).DeepCopyInto(*out) + } + if in.PodDisruptionBudget != nil { + in, out := &in.PodDisruptionBudget, &out.PodDisruptionBudget + *out = new(v1beta1.EmbeddedPodDisruptionBudgetSpec) + (*in).DeepCopyInto(*out) + } + if in.EmbeddedProbes != nil { + in, out := &in.EmbeddedProbes, &out.EmbeddedProbes + *out = new(v1beta1.EmbeddedProbes) + (*in).DeepCopyInto(*out) + } + if in.StatefulStorage != nil { + in, out := &in.StatefulStorage, &out.StatefulStorage + *out = new(v1beta1.StorageSpec) + (*in).DeepCopyInto(*out) + } + if in.PersistentVolumeClaimRetentionPolicy != nil { + in, out := &in.PersistentVolumeClaimRetentionPolicy, &out.PersistentVolumeClaimRetentionPolicy + *out = new(appsv1.StatefulSetPersistentVolumeClaimRetentionPolicy) + **out = **in + } + if in.ClaimTemplates != nil { + in, out := &in.ClaimTemplates, &out.ClaimTemplates + *out = make([]corev1.PersistentVolumeClaim, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.License != nil { + in, out := &in.License, &out.License + *out = new(v1beta1.License) + (*in).DeepCopyInto(*out) + } + out.VMAgentSecurityEnforcements = in.VMAgentSecurityEnforcements + in.CommonDefaultableParams.DeepCopyInto(&out.CommonDefaultableParams) + in.CommonConfigReloaderParams.DeepCopyInto(&out.CommonConfigReloaderParams) + in.CommonApplicationDeploymentParams.DeepCopyInto(&out.CommonApplicationDeploymentParams) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomVMAgentSpec. +func (in *CustomVMAgentSpec) DeepCopy() *CustomVMAgentSpec { + if in == nil { + return nil + } + out := new(CustomVMAgentSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VMAgentNameAndSpec) DeepCopyInto(out *VMAgentNameAndSpec) { + *out = *in + if in.Spec != nil { + in, out := &in.Spec, &out.Spec + *out = new(CustomVMAgentSpec) + (*in).DeepCopyInto(*out) + } + if in.TenantID != nil { + in, out := &in.TenantID, &out.TenantID + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMAgentNameAndSpec. +func (in *VMAgentNameAndSpec) DeepCopy() *VMAgentNameAndSpec { + if in == nil { + return nil + } + out := new(VMAgentNameAndSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VMAuthNameAndSpec) DeepCopyInto(out *VMAuthNameAndSpec) { + *out = *in + if in.Spec != nil { + in, out := &in.Spec, &out.Spec + *out = new(v1beta1.VMAuthLoadBalancerSpec) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMAuthNameAndSpec. +func (in *VMAuthNameAndSpec) DeepCopy() *VMAuthNameAndSpec { + if in == nil { + return nil + } + out := new(VMAuthNameAndSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VMClusterRefOrSpec) DeepCopyInto(out *VMClusterRefOrSpec) { + *out = *in + if in.Ref != nil { + in, out := &in.Ref, &out.Ref + *out = new(corev1.LocalObjectReference) + **out = **in + } + if in.OverrideSpec != nil { + in, out := &in.OverrideSpec, &out.OverrideSpec + *out = new(apiextensionsv1.JSON) + (*in).DeepCopyInto(*out) + } + if in.Spec != nil { + in, out := &in.Spec, &out.Spec + *out = new(v1beta1.VMClusterSpec) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMClusterRefOrSpec. +func (in *VMClusterRefOrSpec) DeepCopy() *VMClusterRefOrSpec { + if in == nil { + return nil + } + out := new(VMClusterRefOrSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VMDistributedCluster) DeepCopyInto(out *VMDistributedCluster) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + if in.ParsedLastAppliedSpec != nil { + in, out := &in.ParsedLastAppliedSpec, &out.ParsedLastAppliedSpec + *out = new(VMDistributedClusterSpec) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMDistributedCluster. +func (in *VMDistributedCluster) DeepCopy() *VMDistributedCluster { + if in == nil { + return nil + } + out := new(VMDistributedCluster) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VMDistributedCluster) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VMDistributedClusterList) DeepCopyInto(out *VMDistributedClusterList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]VMDistributedCluster, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMDistributedClusterList. +func (in *VMDistributedClusterList) DeepCopy() *VMDistributedClusterList { + if in == nil { + return nil + } + out := new(VMDistributedClusterList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *VMDistributedClusterList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VMDistributedClusterSpec) DeepCopyInto(out *VMDistributedClusterSpec) { + *out = *in + if in.ReadyDeadline != nil { + in, out := &in.ReadyDeadline, &out.ReadyDeadline + *out = new(v1.Duration) + **out = **in + } + if in.VMAgentFlushDeadline != nil { + in, out := &in.VMAgentFlushDeadline, &out.VMAgentFlushDeadline + *out = new(v1.Duration) + **out = **in + } + if in.ZoneUpdatePause != nil { + in, out := &in.ZoneUpdatePause, &out.ZoneUpdatePause + *out = new(v1.Duration) + **out = **in + } + in.VMAgent.DeepCopyInto(&out.VMAgent) + in.VMAuth.DeepCopyInto(&out.VMAuth) + in.Zones.DeepCopyInto(&out.Zones) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMDistributedClusterSpec. +func (in *VMDistributedClusterSpec) DeepCopy() *VMDistributedClusterSpec { + if in == nil { + return nil + } + out := new(VMDistributedClusterSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *VMDistributedClusterStatus) DeepCopyInto(out *VMDistributedClusterStatus) { + *out = *in + in.StatusMetadata.DeepCopyInto(&out.StatusMetadata) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMDistributedClusterStatus. +func (in *VMDistributedClusterStatus) DeepCopy() *VMDistributedClusterStatus { + if in == nil { + return nil + } + out := new(VMDistributedClusterStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ZoneSpec) DeepCopyInto(out *ZoneSpec) { + *out = *in + if in.GlobalOverrideSpec != nil { + in, out := &in.GlobalOverrideSpec, &out.GlobalOverrideSpec + *out = new(apiextensionsv1.JSON) + (*in).DeepCopyInto(*out) + } + if in.VMClusters != nil { + in, out := &in.VMClusters, &out.VMClusters + *out = make([]VMClusterRefOrSpec, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ZoneSpec. +func (in *ZoneSpec) DeepCopy() *ZoneSpec { + if in == nil { + return nil + } + out := new(ZoneSpec) + in.DeepCopyInto(out) + return out +} diff --git a/config/crd/kustomization.yaml b/config/crd/kustomization.yaml index f85fd86cd..0205542d1 100644 --- a/config/crd/kustomization.yaml +++ b/config/crd/kustomization.yaml @@ -24,6 +24,7 @@ resources: - bases/operator.victoriametrics.com_vtsingles.yaml - bases/operator.victoriametrics.com_vtclusters.yaml - bases/operator.victoriametrics.com_vmanomalies.yaml +- bases/operator.victoriametrics.com_vmdistributedclusters.yaml patches: # [WEBHOOK] To enable webhook, uncomment all the sections with [WEBHOOK] prefix. # patches here are for enabling the conversion webhook for each CRD diff --git a/config/crd/overlay/crd.specless.yaml b/config/crd/overlay/crd.specless.yaml index 3b6a79e13..99f9ede6d 100644 --- a/config/crd/overlay/crd.specless.yaml +++ b/config/crd/overlay/crd.specless.yaml @@ -1607,6 +1607,143 @@ spec: --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.18.0 + name: vmdistributedclusters.operator.victoriametrics.com +spec: + group: operator.victoriametrics.com + names: + kind: VMDistributedCluster + listKind: VMDistributedClusterList + plural: vmdistributedclusters + singular: vmdistributedcluster + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: current status of update rollout + jsonPath: .status.updateStatus + name: Status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: VMDistributedClusterSpec is progressively rolling out updates + to multiple VMClusters. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: spec defines the desired state of VMDistributedCluster + type: object + x-kubernetes-preserve-unknown-fields: true + status: + description: status defines the observed state of VMDistributedCluster + properties: + conditions: + description: 'Known .status.conditions.type are: "Available", "Progressing", + and "Degraded"' + items: + description: Condition defines status condition of the resource + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. + format: date-time + type: string + lastUpdateTime: + description: |- + LastUpdateTime is the last time of given type update. + This value is used for status TTL update and removal + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + description: |- + ObservedGeneration defines current generation picked by operator for the + reconcile + format: int64 + type: integer + reason: + description: Reason defines human readable error reason + type: string + updateStatus: + description: UpdateStatus defines a status for update rollout + type: string + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.18.0 diff --git a/config/crd/overlay/crd.yaml b/config/crd/overlay/crd.yaml index 59e0d253c..68b1dd521 100644 --- a/config/crd/overlay/crd.yaml +++ b/config/crd/overlay/crd.yaml @@ -13,2271 +13,1091 @@ spec: singular: vlagent scope: Namespaced versions: - - additionalPrinterColumns: - - description: current number of replicas - jsonPath: .status.replicas - name: Replica Count - type: integer - - description: Current status of update rollout - jsonPath: .status.updateStatus - name: Status - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1 - schema: - openAPIV3Schema: - description: VLAgent - is a tiny but brave agent, which helps you collect - logs from various sources and stores them in VictoriaLogs. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VLAgentSpec defines the desired state of VLAgent - properties: - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - claimTemplates: - description: 'ClaimTemplates allows adding additional VolumeClaimTemplates - for VLAgent in Mode: StatefulSet' - items: - description: PersistentVolumeClaim is a user's request for and claim - to a persistent volume - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - description: |- - Standard object's metadata. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - type: object - x-kubernetes-preserve-unknown-fields: true - spec: - description: |- - spec defines the desired characteristics of a volume requested by a pod author. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - x-kubernetes-list-type: atomic - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced + - additionalPrinterColumns: + - jsonPath: .status.replicas + name: Replica Count + type: integer + - jsonPath: .status.updateStatus + name: Status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + affinity: + type: object + x-kubernetes-preserve-unknown-fields: true + claimTemplates: + items: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + x-kubernetes-preserve-unknown-fields: true + spec: + properties: + accessModes: + items: type: string - name: - description: Name is the name of resource being referenced + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + status: + properties: + accessModes: + items: type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + type: array + x-kubernetes-list-type: atomic + allocatedResourceStatuses: + additionalProperties: type: string - required: - - kind - - name - type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: - type: integer - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + capacity: + additionalProperties: + anyOf: - type: integer - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + conditions: + items: + properties: + lastProbeTime: + format: date-time + type: string + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string or nil value indicates that no - VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, - this field can be reset to its previous value (including nil) to cancel the modification. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the - PersistentVolume backing this claim. - type: string - type: object - status: - description: |- - status represents the current information/status of a persistent volume claim. - Read-only. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the actual access modes the volume backing the PVC has. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentVolumeAttributesClassName: type: string - type: array - x-kubernetes-list-type: atomic - allocatedResourceStatuses: - additionalProperties: - description: |- - When a controller receives persistentvolume claim update with ClaimResourceStatus for a resource - that it does not recognizes, then it should ignore that update and let other controllers - handle it. - type: string - description: "allocatedResourceStatuses stores status of - resource being resized for the given PVC.\nKey names follow - standard Kubernetes label syntax. Valid values are either:\n\t* - Un-prefixed keys:\n\t\t- storage - the capacity of the - volume.\n\t* Custom resources must use implementation-defined - prefixed names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or have kubernetes.io - prefix are considered\nreserved and hence may not be used.\n\nClaimResourceStatus - can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState - set when resize controller starts resizing the volume - in control-plane.\n\t- ControllerResizeFailed:\n\t\tState - set when resize has failed in resize controller with a - terminal error.\n\t- NodeResizePending:\n\t\tState set - when resize controller has finished resizing the volume - but further resizing of\n\t\tvolume is needed on the node.\n\t- - NodeResizeInProgress:\n\t\tState set when kubelet starts - resizing the volume.\n\t- NodeResizeFailed:\n\t\tState - set when resizing has failed in kubelet with a terminal - error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor - example: if expanding a PVC for more capacity - this field - can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeFailed\"\nWhen this field is not set, it - means that no resize operation is in progress for the - given PVC.\n\nA controller that receives PVC update with - previously unknown resourceName or ClaimResourceStatus\nshould - ignore the update for the purpose it was designed. For - example - a controller that\nonly is responsible for resizing - capacity of the volume, should ignore PVC updates that - change other valid\nresources associated with PVC.\n\nThis - is an alpha field and requires enabling RecoverVolumeExpansionFailure - feature." - type: object - x-kubernetes-map-type: granular - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: "allocatedResources tracks the resources allocated - to a PVC including its capacity.\nKey names follow standard - Kubernetes label syntax. Valid values are either:\n\t* - Un-prefixed keys:\n\t\t- storage - the capacity of the - volume.\n\t* Custom resources must use implementation-defined - prefixed names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or have kubernetes.io - prefix are considered\nreserved and hence may not be used.\n\nCapacity - reported here may be larger than the actual capacity when - a volume expansion operation\nis requested.\nFor storage - quota, the larger value from allocatedResources and PVC.spec.resources - is used.\nIf allocatedResources is not set, PVC.spec.resources - alone is used for quota calculation.\nIf a volume expansion - capacity request is lowered, allocatedResources is only\nlowered - if there are no expansion operations in progress and if - the actual volume capacity\nis equal or lower than the - requested capacity.\n\nA controller that receives PVC - update with previously unknown resourceName\nshould ignore - the update for the purpose it was designed. For example - - a controller that\nonly is responsible for resizing - capacity of the volume, should ignore PVC updates that - change other valid\nresources associated with PVC.\n\nThis - is an alpha field and requires enabling RecoverVolumeExpansionFailure - feature." - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: capacity represents the actual resources of - the underlying volume. - type: object - conditions: - description: |- - conditions is the current Condition of persistent volume claim. If underlying persistent volume is being - resized then the Condition will be set to 'Resizing'. - items: - description: PersistentVolumeClaimCondition contains details - about state of pvc + modifyVolumeStatus: properties: - lastProbeTime: - description: lastProbeTime is the time we probed the - condition. - format: date-time - type: string - lastTransitionTime: - description: lastTransitionTime is the time the condition - transitioned from one status to another. - format: date-time - type: string - message: - description: message is the human-readable message - indicating details about last transition. - type: string - reason: - description: |- - reason is a unique, this should be a short, machine understandable string that gives the reason - for condition's last transition. If it reports "Resizing" that means the underlying - persistent volume is being resized. - type: string status: - description: |- - Status is the status of the condition. - Can be True, False, Unknown. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required type: string - type: - description: |- - Type is the type of the condition. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about + targetVolumeAttributesClassName: type: string required: - - status - - type + - status type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - currentVolumeAttributesClassName: - description: |- - currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. - When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim - type: string - modifyVolumeStatus: - description: |- - ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. - When this is unset, there is no ModifyVolume operation being attempted. - properties: - status: - description: "status is the status of the ControllerModifyVolume - operation. It can be in any of following states:\n - - Pending\n Pending indicates that the PersistentVolumeClaim - cannot be modified due to unmet requirements, such - as\n the specified VolumeAttributesClass not existing.\n - - InProgress\n InProgress indicates that the volume - is being modified.\n - Infeasible\n Infeasible indicates - that the request has been rejected as invalid by the - CSI driver. To\n\t resolve the error, a valid VolumeAttributesClass - needs to be specified.\nNote: New statuses can be - added in the future. Consumers should check for unknown - statuses and fail appropriately." - type: string - targetVolumeAttributesClassName: - description: targetVolumeAttributesClassName is the - name of the VolumeAttributesClass the PVC currently - being reconciled - type: string - required: - - status - type: object - phase: - description: phase represents the current phase of PersistentVolumeClaim. - type: string - type: object - type: object - type: array - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: - type: string - type: array - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to run - within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: - x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. - properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this DNS resolver option's value. - type: string - type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application container - items: - description: EnvVar represents an environment variable present in - a Container. + phase: + type: string + type: object + type: object + type: array + configMaps: + items: + type: string + type: array + containers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string - required: - - name + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic type: object - x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of ConfigMaps - or Secrets - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + dnsPolicy: + type: string + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + host_aliases: + items: + properties: + hostnames: + items: type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string type: object - type: array - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + k8sCollector: properties: - hostnames: - description: Hostnames for the above IP address. + checkpointsPath: + type: string + decolorizeFields: items: type: string type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. + enabled: + type: boolean + extraFields: type: string - required: - - ip - type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. + ignoreFields: items: type: string type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. + logsPath: type: string - required: - - ip - type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the node - network namespace - type: boolean - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image + it's repository - if needed - type: string - tag: - description: Tag contains desired docker image version - type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + msgFields: + items: + type: string + type: array + tenantID: type: string + timeFields: + items: + type: string + type: array type: object - x-kubernetes-map-type: atomic - type: array - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to run - within a pod. - required: - - name + livenessProbe: type: object x-kubernetes-preserve-unknown-fields: true - type: array - k8sCollector: - description: K8sCollector configures VLAgent logs collection from - K8s pods - properties: - checkpointsPath: - description: |- - CheckpointsPath configures path to file where logs checkpoints are stored. - By default it's stored at host's /var/lib/vlagent_checkpoints/checkpoints.json. - type: string - decolorizeFields: - description: DecolorizeFields defines fields to remove ANSI color - codes across logs ingested from Kubernetes - items: - type: string - type: array - enabled: - description: |- - Enabled switches VLAgent to log collection mode. - Note, for this purpose operator uses DaemonSet, while by default VLAgent uses StatefulSet. - Switching this option will drop all persisted data. - type: boolean - extraFields: - description: |- - ExtraFields defines extra fields as JSON string which should be added to each collected log line - Example: '{"env":"dev","cluster":"staging"}' - type: string - ignoreFields: - description: IgnoreFields defines fields to ignore across logs - ingested from Kubernetes - items: - type: string - type: array - logsPath: - description: |- - LogsPath configures root for logs path - By default VLAgent collects logs from /var/log/containers - type: string - msgFields: - description: MsgField defines fields that may contain the _msg - field - items: - type: string - type: array - tenantID: - description: 'TenantID defines default tenant ID to use for logs - collected from pods in format: :' - type: string - timeFields: - description: TimeFields defines fields that may contain the _time - field - items: - type: string - type: array - type: object - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logFormat: - description: LogFormat for VLAgent to be configured with. - enum: - - default - - json - type: string - logLevel: - description: |- - LogLevel for VLAgent to be configured with. - INFO, WARN, ERROR, FATAL, PANIC - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - managedMetadata: - description: |- - ManagedMetadata defines metadata that will be added to the all objects - created by operator for the given CustomResource - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - type: object - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - nodeSelector: - additionalProperties: + logFormat: + enum: + - default + - json type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - persistentVolumeClaimRetentionPolicy: - description: PersistentVolumeClaimRetentionPolicy allows configuration - of PVC retention policy - properties: - whenDeleted: - description: |- - WhenDeleted specifies what happens to PVCs created from StatefulSet - VolumeClaimTemplates when the StatefulSet is deleted. The default policy - of `Retain` causes PVCs to not be affected by StatefulSet deletion. The - `Delete` policy causes those PVCs to be deleted. - type: string - whenScaled: - description: |- - WhenScaled specifies what happens to PVCs created from StatefulSet - VolumeClaimTemplates when the StatefulSet is scaled down. The default - policy of `Retain` causes PVCs to not be affected by a scaledown. The - `Delete` policy causes the associated PVCs for any excess pods above - the replica count to be deleted. - type: string - type: object - podDisruptionBudget: - description: PodDisruptionBudget created by operator - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at most "maxUnavailable" pods selected by - "selector" are unavailable after the eviction, i.e. even in absence of - the evicted pod. For example, one can prevent all voluntary evictions - by specifying 0. This is a mutually exclusive setting with "minAvailable". - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at least "minAvailable" pods selected by - "selector" will still be available after the eviction, i.e. even in the - absence of the evicted pod. So for example you can prevent all voluntary - evictions by specifying "100%". - x-kubernetes-int-or-string: true - selectorLabels: - additionalProperties: - type: string - description: |- - replaces default labels selector generated by operator - it's useful when you need to create custom budget - type: object - unhealthyPodEvictionPolicy: - description: |- - UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods - - Valid policies are IfHealthyBudget and AlwaysAllow. - If no policy is specified, the default behavior will be used, - which corresponds to the IfHealthyBudget policy. - Available from operator v0.64.0 - enum: - - IfHealthyBudget - - AlwaysAllow - type: string - type: object - podMetadata: - description: PodMetadata configures Labels and Annotations which are - propagated to the vlagent pods. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + managedMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: type: string - type: object - port: - description: Port listen address - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods - type: string - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod condition + type: object + paused: + type: boolean + persistentVolumeClaimRetentionPolicy: properties: - conditionType: - description: ConditionType refers to a condition in the pod's - condition list with matching type. + whenDeleted: type: string - required: - - conditionType - type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - remoteWrite: - description: |- - RemoteWrite list of victoria logs endpoints - for victorialogs it must looks like: http://victoria-logs-single:9428/ - or for cluster different url - https://docs.victoriametrics.com/victorialogs/vlagent/#replication-and-high-availability - items: - description: VLAgentRemoteWriteSpec defines the remote storage configuration - for VmAgent + whenScaled: + type: string + type: object + podDisruptionBudget: properties: - bearerTokenPath: - description: Optional bearer auth token to use for -remoteWrite.url + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow type: string - bearerTokenSecret: - description: Optional bearer auth token to use for -remoteWrite.url - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key + type: object + podMetadata: + properties: + annotations: + additionalProperties: + type: string type: object - x-kubernetes-map-type: atomic - headers: - description: |- - Headers allow configuring custom http headers - Must be in form of semicolon separated header with value - e.g. - headerName: headerValue - items: + labels: + additionalProperties: type: string - type: array - maxDiskUsage: - description: |- - MaxDiskUsage defines the maximum file-based buffer size in bytes for the given remoteWrite - It overrides global configuration defined at remoteWriteSettings.maxDiskUsagePerURL - x-kubernetes-preserve-unknown-fields: true - oauth2: - description: OAuth2 defines auth configuration - properties: - clientIDFile: - description: ClientIDFile defines path to pre-mounted OAuth2 - client id - type: string - clientIDSecret: - description: ClientIDSecret defines secret or configmap - containing the OAuth2 client id - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - clientSecret: - description: The secret containing the OAuth2 client secret - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - clientSecretFile: - description: ClientSecretFile defines path to pre-mounted - OAuth2 client secret - type: string - endpointParams: - additionalProperties: - type: string - description: EndpointParams to append to the token URL - type: object - scopes: - description: Scopes used for the token request - items: - type: string - type: array - tokenURL: - description: TokenURL defines URL to fetch the token from - minLength: 1 - type: string - required: - - tokenURL - type: object - proxyURL: - description: 'ProxyURL for -remoteWrite.url. Supported proxies: - http, https, socks5. Example: socks5://proxy:1234' - type: string - sendTimeout: - description: Timeout for sending a single block of data to -remoteWrite.url - (default 1m0s) - pattern: '[0-9]+(ms|s|m|h)' - type: string - tlsConfig: - description: TLSConfig describes tls configuration for remote - write target - properties: - caFile: - description: CAFile defines path to the pre-mounted file - with TLS ca certificate - type: string - caSecretKeyRef: - description: CASecret defines secret reference with tls - CA key by given key - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - certFile: - description: |- - CertFile defines path to the pre-mounted file with TLS certificate - mutually exclusive with CertSecret - type: string - certSecretKeyRef: - description: |- - CertSecret defines secret reference with TLS cert by given key - mutually exclusive with CASecret - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: |- - KeyFile defines path to the pre-mounted file with TLS cert key - mutually exclusive with CertSecret - type: string - keySecretKeyRef: - description: CertSecret defines secret reference with TLS - key by given key - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string type: object - url: - description: URL of the endpoint to send samples to. + name: type: string - required: - - url - type: object - type: array - remoteWriteSettings: - description: RemoteWriteSettings defines global settings for all remoteWrite - urls. - properties: - flushInterval: - description: Interval for flushing the data to remote storage. - (default 1s) - pattern: '[0-9]+(ms|s|m|h)' - type: string - maxBlockSize: - description: The maximum size of unpacked request to send to remote - storage - x-kubernetes-preserve-unknown-fields: true - maxDiskUsagePerURL: - description: The maximum file-based buffer size in bytes at -remoteWrite.tmpDataPath - x-kubernetes-preserve-unknown-fields: true - queues: - description: The number of concurrent queues - format: int32 - type: integer - showURL: - description: Whether to show -remoteWrite.url in the exported - metrics. It is hidden by default, since it can contain sensitive - auth info - type: boolean - tmpDataPath: - description: |- - Path to directory where temporary data for remote write component is stored (default /vlagent_pq/vlagent-remotewrite-data) - If defined, operator ignores spec.storage field and skips adding volume and volumeMount for pq - type: string - type: object - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - rollingUpdateStrategy: - description: |- - StatefulRollingUpdateStrategy allows configuration for strategyType - set it to RollingUpdate for disabling operator statefulSet rollingUpdate - type: string - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: + type: object + port: type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - serviceAccountName: - description: ServiceAccountName is the name of the ServiceAccount - to use to run the pods - type: string - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vlagent VMServiceScrape - spec - required: - - endpoints - type: object - x-kubernetes-preserve-unknown-fields: true - serviceSpec: - description: ServiceSpec that will be added to vlagent service spec - properties: - metadata: - description: EmbeddedObjectMetadata defines objectMeta for additional - service. + priorityClassName: + type: string + readinessGates: + items: properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names + conditionType: type: string + required: + - conditionType type: object - spec: - description: |- - ServiceSpec describes the attributes that a user creates on a service. - More info: https://kubernetes.io/docs/concepts/services-networking/service/ - type: object - x-kubernetes-preserve-unknown-fields: true - useAsDefault: - description: |- - UseAsDefault applies changes from given service definition to the main object Service - Changing from headless service to clusterIP or loadbalancer may break cross-component communication - type: boolean - required: - - spec - type: object - startupProbe: - description: StartupProbe that will be added to CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - storage: - description: StatefulStorage configures storage for StatefulSet - properties: - disableMountSubPath: - description: |- - Deprecated: subPath usage will be disabled by default in a future release, this option will become unnecessary. - DisableMountSubPath allows to remove any subPath usage in volume mounts. - type: boolean - emptyDir: - description: |- - EmptyDirVolumeSource to be used by the Prometheus StatefulSets. If specified, used in place of any volumeClaimTemplate. More - info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir - properties: - medium: - description: |- - medium represents what type of storage medium should back this directory. - The default is "" which means to use the node's default medium. - Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: |- - sizeLimit is the total amount of local storage required for this EmptyDir volume. - The size limit is also applicable for memory medium. - The maximum usage on memory medium EmptyDir would be the minimum value between - the SizeLimit specified here and the sum of memory limits of all containers in a pod. - The default is nil which means that the limit is undefined. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - volumeClaimTemplate: - description: A PVC spec to be used by the StatefulSets/Deployments. + type: array + readinessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + remoteWrite: + items: properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + bearerTokenPath: type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to - an EmbeddedResource. + bearerTokenSecret: properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object + key: + type: string name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names + default: "" type: string + optional: + type: boolean + required: + - key type: object - spec: - description: |- - Spec defines the desired characteristics of a volume requested by a pod author. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + x-kubernetes-map-type: atomic + headers: + items: + type: string + type: array + maxDiskUsage: + x-kubernetes-preserve-unknown-fields: true + oauth2: properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - x-kubernetes-list-type: atomic - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. + clientIDFile: + type: string + clientIDSecret: properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced + key: type: string name: - description: Name is the name of resource being referenced + default: "" type: string + optional: + type: boolean required: - - kind - - name + - key type: object x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + clientSecret: properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced + key: type: string name: - description: Name is the name of resource being referenced - type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + default: "" type: string + optional: + type: boolean required: - - kind - - name - type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - selector: - description: selector is a label query over volumes to - consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object + - key type: object x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string or nil value indicates that no - VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, - this field can be reset to its previous value (including nil) to cancel the modification. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the - PersistentVolume backing this claim. + clientSecretFile: type: string - type: object - status: - description: |- - Status represents the current information/status of a persistent volume claim. - Read-only. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the actual access modes the volume backing the PVC has. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + endpointParams: + additionalProperties: + type: string + type: object + scopes: items: type: string type: array - x-kubernetes-list-type: atomic - allocatedResourceStatuses: - additionalProperties: - description: |- - When a controller receives persistentvolume claim update with ClaimResourceStatus for a resource - that it does not recognizes, then it should ignore that update and let other controllers - handle it. - type: string - description: "allocatedResourceStatuses stores status - of resource being resized for the given PVC.\nKey names - follow standard Kubernetes label syntax. Valid values - are either:\n\t* Un-prefixed keys:\n\t\t- storage - - the capacity of the volume.\n\t* Custom resources must - use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or have - kubernetes.io prefix are considered\nreserved and hence - may not be used.\n\nClaimResourceStatus can be in any - of following states:\n\t- ControllerResizeInProgress:\n\t\tState - set when resize controller starts resizing the volume - in control-plane.\n\t- ControllerResizeFailed:\n\t\tState - set when resize has failed in resize controller with - a terminal error.\n\t- NodeResizePending:\n\t\tState - set when resize controller has finished resizing the - volume but further resizing of\n\t\tvolume is needed - on the node.\n\t- NodeResizeInProgress:\n\t\tState set - when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState - set when resizing has failed in kubelet with a terminal - error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor - example: if expanding a PVC for more capacity - this - field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeFailed\"\nWhen this field is not set, - it means that no resize operation is in progress for - the given PVC.\n\nA controller that receives PVC update - with previously unknown resourceName or ClaimResourceStatus\nshould - ignore the update for the purpose it was designed. For - example - a controller that\nonly is responsible for - resizing capacity of the volume, should ignore PVC updates - that change other valid\nresources associated with PVC.\n\nThis - is an alpha field and requires enabling RecoverVolumeExpansionFailure - feature." + tokenURL: + minLength: 1 + type: string + required: + - tokenURL + type: object + proxyURL: + type: string + sendTimeout: + pattern: '[0-9]+(ms|s|m|h)' + type: string + tlsConfig: + properties: + caFile: + type: string + caSecretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key type: object - x-kubernetes-map-type: granular - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: "allocatedResources tracks the resources - allocated to a PVC including its capacity.\nKey names - follow standard Kubernetes label syntax. Valid values - are either:\n\t* Un-prefixed keys:\n\t\t- storage - - the capacity of the volume.\n\t* Custom resources must - use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or have - kubernetes.io prefix are considered\nreserved and hence - may not be used.\n\nCapacity reported here may be larger - than the actual capacity when a volume expansion operation\nis - requested.\nFor storage quota, the larger value from - allocatedResources and PVC.spec.resources is used.\nIf - allocatedResources is not set, PVC.spec.resources alone - is used for quota calculation.\nIf a volume expansion - capacity request is lowered, allocatedResources is only\nlowered - if there are no expansion operations in progress and - if the actual volume capacity\nis equal or lower than - the requested capacity.\n\nA controller that receives - PVC update with previously unknown resourceName\nshould - ignore the update for the purpose it was designed. For - example - a controller that\nonly is responsible for - resizing capacity of the volume, should ignore PVC updates - that change other valid\nresources associated with PVC.\n\nThis - is an alpha field and requires enabling RecoverVolumeExpansionFailure - feature." - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: capacity represents the actual resources - of the underlying volume. + x-kubernetes-map-type: atomic + certFile: + type: string + certSecretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key type: object - conditions: - description: |- - conditions is the current Condition of persistent volume claim. If underlying persistent volume is being - resized then the Condition will be set to 'Resizing'. - items: - description: PersistentVolumeClaimCondition contains - details about state of pvc - properties: - lastProbeTime: - description: lastProbeTime is the time we probed - the condition. - format: date-time - type: string - lastTransitionTime: - description: lastTransitionTime is the time the - condition transitioned from one status to another. - format: date-time - type: string - message: - description: message is the human-readable message - indicating details about last transition. - type: string - reason: - description: |- - reason is a unique, this should be a short, machine understandable string that gives the reason - for condition's last transition. If it reports "Resizing" that means the underlying - persistent volume is being resized. - type: string - status: - description: |- - Status is the status of the condition. - Can be True, False, Unknown. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required - type: string - type: - description: |- - Type is the type of the condition. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about - type: string - required: - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - currentVolumeAttributesClassName: - description: |- - currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. - When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim + x-kubernetes-map-type: atomic + insecureSkipVerify: + type: boolean + keyFile: type: string - modifyVolumeStatus: - description: |- - ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. - When this is unset, there is no ModifyVolume operation being attempted. + keySecretKeyRef: properties: - status: - description: "status is the status of the ControllerModifyVolume - operation. It can be in any of following states:\n - - Pending\n Pending indicates that the PersistentVolumeClaim - cannot be modified due to unmet requirements, such - as\n the specified VolumeAttributesClass not existing.\n - - InProgress\n InProgress indicates that the volume - is being modified.\n - Infeasible\n Infeasible - indicates that the request has been rejected as - invalid by the CSI driver. To\n\t resolve the error, - a valid VolumeAttributesClass needs to be specified.\nNote: - New statuses can be added in the future. Consumers - should check for unknown statuses and fail appropriately." + key: type: string - targetVolumeAttributesClassName: - description: targetVolumeAttributesClassName is the - name of the VolumeAttributesClass the PVC currently - being reconciled + name: + default: "" type: string + optional: + type: boolean required: - - status + - key type: object - phase: - description: phase represents the current phase of PersistentVolumeClaim. + x-kubernetes-map-type: atomic + serverName: type: string type: object + url: + type: string + required: + - url type: object - type: object - syslogSpec: - description: SyslogSpec defines syslog listener configuration - properties: - tcpListeners: - description: TCPListeners defines syslog server TCP listener configuration - items: - description: SyslogTCPListener defines configuration for TCP - syslog server listen + type: array + remoteWriteSettings: + properties: + flushInterval: + pattern: '[0-9]+(ms|s|m|h)' + type: string + maxBlockSize: + x-kubernetes-preserve-unknown-fields: true + maxDiskUsagePerURL: + x-kubernetes-preserve-unknown-fields: true + queues: + format: int32 + type: integer + showURL: + type: boolean + tmpDataPath: + type: string + type: object + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdateStrategy: + type: string + runtimeClassName: + type: string + schedulerName: + type: string + secrets: + items: + type: string + type: array + securityContext: + type: object + x-kubernetes-preserve-unknown-fields: true + serviceAccountName: + type: string + serviceScrapeSpec: + required: + - endpoints + type: object + x-kubernetes-preserve-unknown-fields: true + serviceSpec: + properties: + metadata: properties: - compressMethod: - description: |- - CompressMethod for syslog messages - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#compression - pattern: ^(none|zstd|gzip|deflate)$ - type: string - decolorizeFields: - description: |- - DecolorizeFields to remove ANSI color codes across logs - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#decolorizing-fields - type: string - ignoreFields: - description: |- - IgnoreFields to ignore at logs - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#dropping-fields - type: string - listenPort: - description: ListenPort defines listen port - format: int32 - type: integer - streamFields: - description: |- - StreamFields to use as log stream labels - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#stream-fields + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: type: string - tenantID: - description: |- - TenantID for logs ingested in form of accountID:projectID - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#multiple-configs + type: object + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + useAsDefault: + type: boolean + required: + - spec + type: object + startupProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + storage: + properties: + disableMountSubPath: + type: boolean + emptyDir: + properties: + medium: type: string - tlsConfig: - description: TLSServerConfig defines VictoriaMetrics TLS - configuration for the application's server + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + volumeClaimTemplate: + properties: + apiVersion: + type: string + kind: + type: string + metadata: properties: - certFile: - description: |- - CertFile defines path to the pre-mounted file with certificate - mutually exclusive with CertSecret - type: string - certSecret: - description: |- - CertSecretRef defines reference for secret with certificate content under given key - mutually exclusive with CertFile + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + apiGroup: + type: string + kind: type: string name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean required: - - key + - kind + - name type: object x-kubernetes-map-type: atomic - keyFile: - description: |- - KeyFile defines path to the pre-mounted file with certificate key - mutually exclusive with KeySecretRef - type: string - keySecret: - description: |- - Key defines reference for secret with certificate key content under given key - mutually exclusive with KeyFile + dataSourceRef: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + apiGroup: + type: string + kind: type: string name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean + namespace: + type: string required: - - key + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object type: object x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string type: object - required: - - listenPort - type: object - type: array - udpListeners: - description: UDPListeners defines syslog server UDP listener configuration - items: - description: SyslogUDPListener defines configuration for UDP - syslog server listen - properties: - compressMethod: - description: |- - CompressMethod for syslog messages - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#compression - pattern: ^(none|zstd|gzip|deflate)$ - type: string - decolorizeFields: - description: |- - DecolorizeFields to remove ANSI color codes across logs - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#decolorizing-fields - type: string - ignoreFields: - description: |- - IgnoreFields to ignore at logs - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#dropping-fields - type: string - listenPort: - description: ListenPort defines listen port - format: int32 - type: integer - streamFields: - description: |- - StreamFields to use as log stream labels - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#stream-fields - type: string - tenantID: - description: |- - TenantID for logs ingested in form of accountID:projectID - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#multiple-configs - type: string - required: - - listenPort - type: object - type: array - type: object - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container graceful - termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread matching - pods among the given topology. - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that may - be accessed by any container in the pod. - required: - - name + status: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + allocatedResourceStatuses: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + conditions: + items: + properties: + lastProbeTime: + format: date-time + type: string + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentVolumeAttributesClassName: + type: string + modifyVolumeStatus: + properties: + status: + type: string + targetVolumeAttributesClassName: + type: string + required: + - status + type: object + phase: + type: string + type: object + type: object type: object - x-kubernetes-preserve-unknown-fields: true - type: array - required: - - remoteWrite - type: object - status: - description: VLAgentStatus defines the observed state of VLAgent - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource + syslogSpec: properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 - type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - replicas: - description: ReplicaCount Total number of pods targeted by this VLAgent - format: int32 - type: integer - selector: - description: Selector string form of label value set for autoscaling - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - type: object - served: true - storage: true - subresources: - scale: - labelSelectorPath: .status.selector - specReplicasPath: .spec.shardCount - statusReplicasPath: .status.shards - status: {} + tcpListeners: + items: + properties: + compressMethod: + pattern: ^(none|zstd|gzip|deflate)$ + type: string + decolorizeFields: + type: string + ignoreFields: + type: string + listenPort: + format: int32 + type: integer + streamFields: + type: string + tenantID: + type: string + tlsConfig: + properties: + certFile: + type: string + certSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - listenPort + type: object + type: array + udpListeners: + items: + properties: + compressMethod: + pattern: ^(none|zstd|gzip|deflate)$ + type: string + decolorizeFields: + type: string + ignoreFields: + type: string + listenPort: + format: int32 + type: integer + streamFields: + type: string + tenantID: + type: string + required: + - listenPort + type: object + type: array + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + required: + - remoteWrite + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + replicas: + format: int32 + type: integer + selector: + type: string + updateStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + scale: + labelSelectorPath: .status.selector + specReplicasPath: .spec.shardCount + statusReplicasPath: .status.shards + status: {} --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -2294,27858 +1114,40563 @@ spec: singular: vlcluster scope: Namespaced versions: - - additionalPrinterColumns: - - description: replicas of VLInsert - jsonPath: .spec.vlinsert.replicaCount - name: Insert Count - type: string - - description: replicas of VLStorage - jsonPath: .spec.vlstorage.replicaCount - name: Storage Count - type: string - - description: replicas of VLSelect - jsonPath: .spec.vlselect.replicaCount - name: Select Count - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - description: Current status of cluster - jsonPath: .status.updateStatus - name: Status - type: string - name: v1 - schema: - openAPIV3Schema: - description: VLCluster is fast, cost-effective and scalable logs database. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VLClusterSpec defines the desired state of VLCluster - properties: - clusterDomainName: - description: |- - ClusterDomainName defines domain name suffix for in-cluster dns addresses - aka .cluster.local - used by vlinsert and vlselect to build vlstorage address - type: string - clusterVersion: - description: |- - ClusterVersion defines default images tag for all components. - it can be overwritten with component specific image.tag value. - type: string - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. + - additionalPrinterColumns: + - jsonPath: .spec.vlinsert.replicaCount + name: Insert Count + type: string + - jsonPath: .spec.vlstorage.replicaCount + name: Storage Count + type: string + - jsonPath: .spec.vlselect.replicaCount + name: Select Count + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.updateStatus + name: Status + type: string + name: v1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + clusterDomainName: + type: string + clusterVersion: + type: string + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + managedMetadata: properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object type: object - x-kubernetes-map-type: atomic - type: array - managedMetadata: - description: |- - ManagedMetadata defines metadata that will be added to the all objects - created by operator for the given CustomResource - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - requestsLoadBalancer: - description: |- - RequestsLoadBalancer configures load-balancing for vlinsert and vlselect requests. - It helps to evenly spread load across pods. - Usually it's not possible with Kubernetes TCP-based services. - properties: - disableInsertBalancing: - type: boolean - disableSelectBalancing: - type: boolean - enabled: - type: boolean - spec: - description: |- - VMAuthLoadBalancerSpec defines configuration spec for VMAuth used as load-balancer - for VMCluster component - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - serviceAccountName: - description: |- - ServiceAccountName is the name of the ServiceAccount to use to run the - VLSelect, VLInsert and VLStorage Pods. - type: string - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - vlinsert: - description: VLInsert defines vlinsert component configuration at - victoria-logs cluster - properties: - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: - type: string - type: array - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to - run within a pod. - required: - - name + paused: + type: boolean + requestsLoadBalancer: + properties: + disableInsertBalancing: + type: boolean + disableSelectBalancing: + type: boolean + enabled: + type: boolean + spec: type: object x-kubernetes-preserve-unknown-fields: true - type: array - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: - x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. - properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this DNS resolver option's value. - type: string - type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application - container - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string - required: - - name + type: object + serviceAccountName: + type: string + useStrictSecurity: + type: boolean + vlinsert: + properties: + affinity: type: object x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of - ConfigMaps or Secrets - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. + configMaps: + items: + type: string + type: array + containers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true properties: - hostnames: - description: Hostnames for the above IP address. + nameservers: items: type: string type: array x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: items: type: string type: array x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the - node network namespace - type: boolean - hpa: - description: Configures horizontal pod autoscaling. - type: object - x-kubernetes-preserve-unknown-fields: true - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image + it's - repository if needed - type: string - tag: - description: Tag contains desired docker image version + dnsPolicy: + type: string + extraArgs: + additionalProperties: type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string type: object - x-kubernetes-map-type: atomic - type: array - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to - run within a pod. - required: - - name + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + hpa: type: object x-kubernetes-preserve-unknown-fields: true - type: array - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logFormat: - description: |- - LogFormat for VLSelect to be configured with. - default or json - enum: - - default - - json - type: string - logLevel: - description: LogLevel for VLSelect to be configured with. - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - nodeSelector: - additionalProperties: - type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - podDisruptionBudget: - description: PodDisruptionBudget created by operator - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at most "maxUnavailable" pods selected by - "selector" are unavailable after the eviction, i.e. even in absence of - the evicted pod. For example, one can prevent all voluntary evictions - by specifying 0. This is a mutually exclusive setting with "minAvailable". - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at least "minAvailable" pods selected by - "selector" will still be available after the eviction, i.e. even in the - absence of the evicted pod. So for example you can prevent all voluntary - evictions by specifying "100%". - x-kubernetes-int-or-string: true - selectorLabels: - additionalProperties: + image: + properties: + pullPolicy: type: string - description: |- - replaces default labels selector generated by operator - it's useful when you need to create custom budget - type: object - unhealthyPodEvictionPolicy: - description: |- - UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods - - Valid policies are IfHealthyBudget and AlwaysAllow. - If no policy is specified, the default behavior will be used, - which corresponds to the IfHealthyBudget policy. - Available from operator v0.64.0 - enum: - - IfHealthyBudget - - AlwaysAllow - type: string - type: object - podMetadata: - description: PodMetadata configures Labels and Annotations which - are propagated to the VLSelect pods. - properties: - annotations: - additionalProperties: + repository: type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: + tag: type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + type: object + imagePullSecrets: + items: + properties: + name: + default: "" + type: string type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + livenessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + logFormat: + enum: + - default + - json + type: string + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: type: string - type: object - port: - description: Port listen address - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods - type: string - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod - condition - properties: - conditionType: - description: ConditionType refers to a condition in the - pod's condition list with matching type. - type: string - required: - - conditionType type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: + paused: + type: boolean + podDisruptionBudget: + properties: + maxUnavailable: anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + - type: integer + - type: string x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: + minAvailable: anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + - type: integer + - type: string x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow + type: string + type: object + podMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + port: + type: string + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType type: object - type: object - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - rollingUpdate: - description: RollingUpdate - overrides deployment update params. - properties: - maxSurge: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of pods that can be scheduled above the desired number of - pods. - Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - This can not be 0 if MaxUnavailable is 0. - Absolute number is calculated from percentage by rounding up. - Defaults to 25%. - Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when - the rolling update starts, such that the total number of old and new pods do not exceed - 130% of desired pods. Once old pods have been killed, - new ReplicaSet can be scaled up further, ensuring that total number of pods running - at any time during the update is at most 130% of desired pods. - x-kubernetes-int-or-string: true - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of pods that can be unavailable during the update. - Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - Absolute number is calculated from percentage by rounding down. - This can not be 0 if MaxSurge is 0. - Defaults to 25%. - Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods - immediately when the rolling update starts. Once new pods are ready, old ReplicaSet - can be scaled down further, followed by scaling up the new ReplicaSet, ensuring - that the total number of pods available at all times during the update is at - least 70% of desired pods. - x-kubernetes-int-or-string: true - type: object - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: - type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vlselect - VMServiceScrape spec - required: - - endpoints - type: object - x-kubernetes-preserve-unknown-fields: true - serviceSpec: - description: ServiceSpec that will be added to vlselect service - spec - properties: - metadata: - description: EmbeddedObjectMetadata defines objectMeta for - additional service. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + type: array + readinessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - spec: - description: |- - ServiceSpec describes the attributes that a user creates on a service. - More info: https://kubernetes.io/docs/concepts/services-networking/service/ - type: object - x-kubernetes-preserve-unknown-fields: true - useAsDefault: - description: |- - UseAsDefault applies changes from given service definition to the main object Service - Changing from headless service to clusterIP or loadbalancer may break cross-component communication - type: boolean - required: - - spec - type: object - startupProbe: - description: StartupProbe that will be added to CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - syslogSpec: - description: SyslogSpec defines syslog listener configuration - properties: - tcpListeners: - description: TCPListeners defines syslog server TCP listener - configuration - items: - description: SyslogTCPListener defines configuration for - TCP syslog server listen - properties: - compressMethod: - description: |- - CompressMethod for syslog messages - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#compression - pattern: ^(none|zstd|gzip|deflate)$ - type: string - decolorizeFields: - description: |- - DecolorizeFields to remove ANSI color codes across logs - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#decolorizing-fields - type: string - ignoreFields: - description: |- - IgnoreFields to ignore at logs - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#dropping-fields - type: string - listenPort: - description: ListenPort defines listen port - format: int32 - type: integer - streamFields: - description: |- - StreamFields to use as log stream labels - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#stream-fields - type: string - tenantID: - description: |- - TenantID for logs ingested in form of accountID:projectID - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#multiple-configs - type: string - tlsConfig: - description: TLSServerConfig defines VictoriaMetrics - TLS configuration for the application's server - properties: - certFile: - description: |- - CertFile defines path to the pre-mounted file with certificate - mutually exclusive with CertSecret - type: string - certSecret: - description: |- - CertSecretRef defines reference for secret with certificate content under given key - mutually exclusive with CertFile - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - keyFile: - description: |- - KeyFile defines path to the pre-mounted file with certificate key - mutually exclusive with KeySecretRef - type: string - keySecret: - description: |- - Key defines reference for secret with certificate key content under given key - mutually exclusive with KeyFile - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - listenPort + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object - type: array - udpListeners: - description: UDPListeners defines syslog server UDP listener - configuration - items: - description: SyslogUDPListener defines configuration for - UDP syslog server listen - properties: - compressMethod: - description: |- - CompressMethod for syslog messages - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#compression - pattern: ^(none|zstd|gzip|deflate)$ - type: string - decolorizeFields: - description: |- - DecolorizeFields to remove ANSI color codes across logs - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#decolorizing-fields - type: string - ignoreFields: - description: |- - IgnoreFields to ignore at logs - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#dropping-fields - type: string - listenPort: - description: ListenPort defines listen port - format: int32 - type: integer - streamFields: - description: |- - StreamFields to use as log stream labels - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#stream-fields - type: string - tenantID: - description: |- - TenantID for logs ingested in form of accountID:projectID - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#multiple-configs - type: string - required: - - listenPort + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object - type: array - type: object - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container - graceful termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread - matching pods among the given topology. - required: - - maxSkew - - topologyKey - - whenUnsatisfiable type: object - x-kubernetes-preserve-unknown-fields: true - type: array - updateStrategy: - description: UpdateStrategy - overrides default update strategy. - enum: - - Recreate - - RollingUpdate - type: string - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdate: properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that - may be accessed by any container in the pod. - required: - - name + maxSurge: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true type: object - x-kubernetes-preserve-unknown-fields: true - type: array - type: object - vlselect: - description: VLSelect defines vlselect component configuration at - victoria-logs cluster - properties: - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: + runtimeClassName: type: string - type: array - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to - run within a pod. - required: - - name + schedulerName: + type: string + secrets: + items: + type: string + type: array + securityContext: type: object x-kubernetes-preserve-unknown-fields: true - type: array - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: - x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. - properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this DNS resolver option's value. - type: string - type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application - container - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string + serviceScrapeSpec: required: - - name + - endpoints type: object x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of - ConfigMaps or Secrets + serviceSpec: properties: - configMapRef: - description: The ConfigMap to select from + metadata: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean + spec: type: object - x-kubernetes-map-type: atomic - type: object - type: array - extraStorageNodes: - description: ExtraStorageNodes - defines additional storage nodes - to VLSelect - items: - description: VLStorageNode defines slice of additional vlstorage - nodes - properties: - addr: - description: Addr defines storage node address - type: string + x-kubernetes-preserve-unknown-fields: true + useAsDefault: + type: boolean required: - - addr + - spec type: object - type: array - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip + startupProbe: type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. + x-kubernetes-preserve-unknown-fields: true + syslogSpec: properties: - hostnames: - description: Hostnames for the above IP address. + tcpListeners: items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the - node network namespace - type: boolean - hpa: - description: Configures horizontal pod autoscaling. - type: object - x-kubernetes-preserve-unknown-fields: true - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image + it's - repository if needed - type: string - tag: - description: Tag contains desired docker image version - type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - type: array - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to - run within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logFormat: - description: |- - LogFormat for VLSelect to be configured with. - default or json - enum: - - default - - json - type: string - logLevel: - description: LogLevel for VLSelect to be configured with. - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - nodeSelector: - additionalProperties: - type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - podDisruptionBudget: - description: PodDisruptionBudget created by operator - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at most "maxUnavailable" pods selected by - "selector" are unavailable after the eviction, i.e. even in absence of - the evicted pod. For example, one can prevent all voluntary evictions - by specifying 0. This is a mutually exclusive setting with "minAvailable". - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at least "minAvailable" pods selected by - "selector" will still be available after the eviction, i.e. even in the - absence of the evicted pod. So for example you can prevent all voluntary - evictions by specifying "100%". - x-kubernetes-int-or-string: true - selectorLabels: - additionalProperties: - type: string - description: |- - replaces default labels selector generated by operator - it's useful when you need to create custom budget - type: object - unhealthyPodEvictionPolicy: - description: |- - UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods - - Valid policies are IfHealthyBudget and AlwaysAllow. - If no policy is specified, the default behavior will be used, - which corresponds to the IfHealthyBudget policy. - Available from operator v0.64.0 - enum: - - IfHealthyBudget - - AlwaysAllow - type: string - type: object - podMetadata: - description: PodMetadata configures Labels and Annotations which - are propagated to the VLSelect pods. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - port: - description: Port listen address - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods - type: string - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod - condition - properties: - conditionType: - description: ConditionType refers to a condition in the - pod's condition list with matching type. - type: string - required: - - conditionType + properties: + compressMethod: + pattern: ^(none|zstd|gzip|deflate)$ + type: string + decolorizeFields: + type: string + ignoreFields: + type: string + listenPort: + format: int32 + type: integer + streamFields: + type: string + tenantID: + type: string + tlsConfig: + properties: + certFile: + type: string + certSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - listenPort + type: object + type: array + udpListeners: + items: + properties: + compressMethod: + pattern: ^(none|zstd|gzip|deflate)$ + type: string + decolorizeFields: + type: string + ignoreFields: + type: string + listenPort: + format: int32 + type: integer + streamFields: + type: string + tenantID: + type: string + required: + - listenPort + type: object + type: array type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: array + topologySpreadConstraints: + items: + required: + - maxSkew + - topologyKey + - whenUnsatisfiable type: object - type: object - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - rollingUpdate: - description: RollingUpdate - overrides deployment update params. - properties: - maxSurge: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of pods that can be scheduled above the desired number of - pods. - Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - This can not be 0 if MaxUnavailable is 0. - Absolute number is calculated from percentage by rounding up. - Defaults to 25%. - Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when - the rolling update starts, such that the total number of old and new pods do not exceed - 130% of desired pods. Once old pods have been killed, - new ReplicaSet can be scaled up further, ensuring that total number of pods running - at any time during the update is at most 130% of desired pods. - x-kubernetes-int-or-string: true - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of pods that can be unavailable during the update. - Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - Absolute number is calculated from percentage by rounding down. - This can not be 0 if MaxSurge is 0. - Defaults to 25%. - Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods - immediately when the rolling update starts. Once new pods are ready, old ReplicaSet - can be scaled down further, followed by scaling up the new ReplicaSet, ensuring - that the total number of pods available at all times during the update is at - least 70% of desired pods. - x-kubernetes-int-or-string: true - type: object - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: + x-kubernetes-preserve-unknown-fields: true + type: array + updateStrategy: + enum: + - Recreate + - RollingUpdate type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vlselect - VMServiceScrape spec - required: - - endpoints - type: object - x-kubernetes-preserve-unknown-fields: true - serviceSpec: - description: ServiceSpec that will be added to vlselect service - spec - properties: - metadata: - description: EmbeddedObjectMetadata defines objectMeta for - additional service. + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + volumeMounts: + items: properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object + mountPath: + type: string + mountPropagation: + type: string name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name type: object - spec: - description: |- - ServiceSpec describes the attributes that a user creates on a service. - More info: https://kubernetes.io/docs/concepts/services-networking/service/ + type: array + volumes: + items: + required: + - name type: object x-kubernetes-preserve-unknown-fields: true - useAsDefault: - description: |- - UseAsDefault applies changes from given service definition to the main object Service - Changing from headless service to clusterIP or loadbalancer may break cross-component communication - type: boolean - required: - - spec - type: object - startupProbe: - description: StartupProbe that will be added to CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container - graceful termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread - matching pods among the given topology. - required: - - maxSkew - - topologyKey - - whenUnsatisfiable + type: array + type: object + vlselect: + properties: + affinity: type: object x-kubernetes-preserve-unknown-fields: true - type: array - updateStrategy: - description: UpdateStrategy - overrides default update strategy. - enum: - - Recreate - - RollingUpdate - type: string - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. + configMaps: + items: + type: string + type: array + containers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that - may be accessed by any container in the pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - type: object - vlstorage: - description: VLStorage defines vlstorage component configuration at - victoria-logs cluster - properties: - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - claimTemplates: - description: ClaimTemplates allows adding additional VolumeClaimTemplates - for StatefulSet - items: - description: PersistentVolumeClaim is a user's request for and - claim to a persistent volume + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic type: object - x-kubernetes-preserve-unknown-fields: true - type: array - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: + dnsPolicy: type: string - type: array - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to - run within a pod. - required: - - name + extraArgs: + additionalProperties: + type: string type: object - x-kubernetes-preserve-unknown-fields: true - type: array - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: - x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. - properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + extraStorageNodes: + items: + properties: + addr: + type: string + required: + - addr + type: object + type: array + host_aliases: + items: + properties: + hostnames: + items: type: string - value: - description: Value is this DNS resolver option's value. + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: type: string - type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application - container - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string - required: - - name + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + hpa: type: object x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of - ConfigMaps or Secrets + image: properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. + pullPolicy: + type: string + repository: + type: string + tag: type: string - secretRef: - description: The Secret to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic type: object - type: array - futureRetention: - description: |- - FutureRetention for the stored logs - Log entries with timestamps bigger than now+futureRetention are rejected during data ingestion; see https://docs.victoriametrics.com/victorialogs/#retention - pattern: ^[0-9]+(h|d|w|y)?$ - type: string - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: + imagePullSecrets: + items: + properties: + name: + default: "" type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + livenessProbe: type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. + x-kubernetes-preserve-unknown-fields: true + logFormat: + enum: + - default + - json + type: string + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + podDisruptionBudget: properties: - hostnames: - description: Hostnames for the above IP address. - items: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow type: string - required: - - ip type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the - node network namespace - type: boolean - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image + it's - repository if needed - type: string - tag: - description: Tag contains desired docker image version - type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. + podMetadata: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string type: object - x-kubernetes-map-type: atomic - type: array - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to - run within a pod. - required: - - name + port: + type: string + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + readinessProbe: type: object x-kubernetes-preserve-unknown-fields: true - type: array - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logFormat: - description: |- - LogFormat for VLStorage to be configured with. - default or json - enum: - - default - - json - type: string - logIngestedRows: - description: Whether to log all the ingested log entries; this - can be useful for debugging of data ingestion; see https://docs.victoriametrics.com/victorialogs/data-ingestion/ - type: boolean - logLevel: - description: LogLevel for VLStorage to be configured with. - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - logNewStreams: - description: LogNewStreams Whether to log creation of new streams; - this can be useful for debugging of high cardinality issues - with log streams; see https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields - type: boolean - maintenanceInsertNodeIDs: - description: |- - MaintenanceInsertNodeIDs - excludes given node ids from insert requests routing, must contain pod suffixes - for pod-0, id will be 0 and etc. - lets say, you have pod-0, pod-1, pod-2, pod-3. to exclude pod-0 and pod-3 from insert routing, define nodeIDs: [0,3]. - Useful at storage expanding, when you want to rebalance some data at cluster. - items: - format: int32 - type: integer - type: array - maintenanceSelectNodeIDs: - description: MaintenanceInsertNodeIDs - excludes given node ids - from select requests routing, must contain pod suffixes - for - pod-0, id will be 0 and etc. - items: + replicaCount: format: int32 type: integer - type: array - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - nodeSelector: - additionalProperties: - type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - persistentVolumeClaimRetentionPolicy: - description: PersistentVolumeClaimRetentionPolicy allows configuration - of PVC retention policy - properties: - whenDeleted: - description: |- - WhenDeleted specifies what happens to PVCs created from StatefulSet - VolumeClaimTemplates when the StatefulSet is deleted. The default policy - of `Retain` causes PVCs to not be affected by StatefulSet deletion. The - `Delete` policy causes those PVCs to be deleted. - type: string - whenScaled: - description: |- - WhenScaled specifies what happens to PVCs created from StatefulSet - VolumeClaimTemplates when the StatefulSet is scaled down. The default - policy of `Retain` causes PVCs to not be affected by a scaledown. The - `Delete` policy causes the associated PVCs for any excess pods above - the replica count to be deleted. - type: string - type: object - podDisruptionBudget: - description: PodDisruptionBudget created by operator - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at most "maxUnavailable" pods selected by - "selector" are unavailable after the eviction, i.e. even in absence of - the evicted pod. For example, one can prevent all voluntary evictions - by specifying 0. This is a mutually exclusive setting with "minAvailable". - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at least "minAvailable" pods selected by - "selector" will still be available after the eviction, i.e. even in the - absence of the evicted pod. So for example you can prevent all voluntary - evictions by specifying "100%". - x-kubernetes-int-or-string: true - selectorLabels: - additionalProperties: - type: string - description: |- - replaces default labels selector generated by operator - it's useful when you need to create custom budget - type: object - unhealthyPodEvictionPolicy: - description: |- - UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods - - Valid policies are IfHealthyBudget and AlwaysAllow. - If no policy is specified, the default behavior will be used, - which corresponds to the IfHealthyBudget policy. - Available from operator v0.64.0 - enum: - - IfHealthyBudget - - AlwaysAllow - type: string - type: object - podMetadata: - description: PodMetadata configures Labels and Annotations which - are propagated to the VLStorage pods. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - port: - description: Port listen address - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods - type: string - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod - condition + resources: properties: - conditionType: - description: ConditionType refers to a condition in the - pod's condition list with matching type. - type: string - required: - - conditionType - type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdate: + properties: + maxSurge: anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + - type: integer + - type: string x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: + maxUnavailable: anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - retentionMaxDiskSpaceUsageBytes: - description: |- - RetentionMaxDiskSpaceUsageBytes for the stored logs - VictoriaLogs keeps at least two last days of data in order to guarantee that the logs for the last day can be returned in queries. - This means that the total disk space usage may exceed the -retention.maxDiskSpaceUsageBytes, - if the size of the last two days of data exceeds the -retention.maxDiskSpaceUsageBytes. - https://docs.victoriametrics.com/victorialogs/#retention-by-disk-space-usage - type: string - retentionPeriod: - description: |- - RetentionPeriod for the stored logs - https://docs.victoriametrics.com/victorialogs/#retention - pattern: ^[0-9]+(h|d|w|y)?$ - type: string - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - rollingUpdateStrategy: - description: |- - RollingUpdateStrategy defines strategy for application updates - Default is OnDelete, in this case operator handles update process - Can be changed for RollingUpdate - type: string - rollingUpdateStrategyBehavior: - description: |- - RollingUpdateStrategyBehavior defines customized behavior for rolling updates. - It applies if the RollingUpdateStrategy is set to OnDelete, which is the default. - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - MaxUnavailable defines the maximum number of pods that can be unavailable during the update. - It can be specified as an absolute number (e.g. 2) or a percentage of the total pods (e.g. "50%"). - For example, if set to 100%, all pods will be upgraded at once, minimizing downtime when needed. - x-kubernetes-int-or-string: true - type: object - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: - type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vlselect - VMServiceScrape spec - required: - - endpoints - type: object - x-kubernetes-preserve-unknown-fields: true - serviceSpec: - description: ServiceSpec that will be added to vlselect service - spec - properties: - metadata: - description: EmbeddedObjectMetadata defines objectMeta for - additional service. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - spec: - description: |- - ServiceSpec describes the attributes that a user creates on a service. - More info: https://kubernetes.io/docs/concepts/services-networking/service/ - type: object - x-kubernetes-preserve-unknown-fields: true - useAsDefault: - description: |- - UseAsDefault applies changes from given service definition to the main object Service - Changing from headless service to clusterIP or loadbalancer may break cross-component communication - type: boolean - required: - - spec - type: object - startupProbe: - description: StartupProbe that will be added to CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - storage: - description: Storage configures persistent volume for VLStorage - properties: - disableMountSubPath: - description: |- - Deprecated: subPath usage will be disabled by default in a future release, this option will become unnecessary. - DisableMountSubPath allows to remove any subPath usage in volume mounts. - type: boolean - emptyDir: - description: |- - EmptyDirVolumeSource to be used by the Prometheus StatefulSets. If specified, used in place of any volumeClaimTemplate. More - info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir - properties: - medium: - description: |- - medium represents what type of storage medium should back this directory. - The default is "" which means to use the node's default medium. - Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - type: string - sizeLimit: - anyOf: - type: integer - type: string - description: |- - sizeLimit is the total amount of local storage required for this EmptyDir volume. - The size limit is also applicable for memory medium. - The maximum usage on memory medium EmptyDir would be the minimum value between - the SizeLimit specified here and the sum of memory limits of all containers in a pod. - The default is nil which means that the limit is undefined. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - volumeClaimTemplate: - description: A PVC spec to be used by the StatefulSets/Deployments. - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - storageDataPath: - description: StorageDataPath - path to storage data - type: string - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container - graceful termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string + x-kubernetes-int-or-string: true type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread - matching pods among the given topology. + runtimeClassName: + type: string + schedulerName: + type: string + secrets: + items: + type: string + type: array + securityContext: + type: object + x-kubernetes-preserve-unknown-fields: true + serviceScrapeSpec: required: - - maxSkew - - topologyKey - - whenUnsatisfiable + - endpoints type: object x-kubernetes-preserve-unknown-fields: true - type: array - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. + serviceSpec: properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + useAsDefault: type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string required: - - mountPath - - name + - spec type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that - may be accessed by any container in the pod. - required: - - name + startupProbe: type: object x-kubernetes-preserve-unknown-fields: true - type: array - type: object - type: object - status: - description: VLClusterStatus defines the observed state of VLCluster - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. + terminationGracePeriodSeconds: format: int64 - minimum: 0 type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - type: string - status: - description: status of the condition, one of True, False, Unknown. + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + updateStrategy: enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 + - Recreate + - RollingUpdate type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.18.0 - name: vlogs.operator.victoriametrics.com -spec: - group: operator.victoriametrics.com - names: - kind: VLogs - listKind: VLogsList - plural: vlogs - singular: vlogs - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: Current status of logs instance update process - jsonPath: .status.status - name: Status - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1beta1 - schema: - openAPIV3Schema: - description: |- - VLogs is fast, cost-effective and scalable logs database. - VLogs is the Schema for the vlogs API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: |- - VLogsSpec defines the desired state of VLogs - VLogs is deprecated, migrate to the VLSingle - required: - - retentionPeriod - type: object - x-kubernetes-preserve-unknown-fields: true - status: - description: VLogsStatus defines the observed state of VLogs - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + vlstorage: properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 - type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.18.0 - name: vlsingles.operator.victoriametrics.com -spec: - group: operator.victoriametrics.com - names: - kind: VLSingle - listKind: VLSingleList - plural: vlsingles - singular: vlsingle - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: Current status of logs instance update process - jsonPath: .status.status - name: Status - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1 - schema: - openAPIV3Schema: - description: |- - VLSingle is fast, cost-effective and scalable logs database. - VLSingle is the Schema for the API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VLSingleSpec defines the desired state of VLSingle - properties: - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: - type: string - type: array - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to run - within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: - x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. + affinity: + type: object + x-kubernetes-preserve-unknown-fields: true + claimTemplates: + items: + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + configMaps: + items: + type: string + type: array + containers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this DNS resolver option's value. - type: string + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application container - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". + dnsPolicy: type: string - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of ConfigMaps - or Secrets - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean + extraArgs: + additionalProperties: + type: string type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + futureRetention: + pattern: ^[0-9]+(h|d|w|y)?$ type: string - secretRef: - description: The Secret to select from + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + image: properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + pullPolicy: + type: string + repository: + type: string + tag: type: string - optional: - description: Specify whether the Secret must be defined - type: boolean type: object - x-kubernetes-map-type: atomic - type: object - type: array - futureRetention: - description: |- - FutureRetention for the stored logs - Log entries with timestamps bigger than now+futureRetention are rejected during data ingestion; see https://docs.victoriametrics.com/victorialogs/#retention - pattern: ^[0-9]+(h|d|y)?$ - type: string - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. + imagePullSecrets: items: - type: string + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. + initContainers: items: - type: string + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the node - network namespace - type: boolean - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image + it's repository - if needed - type: string - tag: - description: Tag contains desired docker image version - type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - type: array - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to run - within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logFormat: - description: LogFormat for VLSingle to be configured with. - enum: - - default - - json - type: string - logIngestedRows: - description: Whether to log all the ingested log entries; this can - be useful for debugging of data ingestion; see https://docs.victoriametrics.com/victorialogs/data-ingestion/ - type: boolean - logLevel: - description: LogLevel for VictoriaLogs to be configured with. - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - logNewStreams: - description: LogNewStreams Whether to log creation of new streams; - this can be useful for debugging of high cardinality issues with - log streams; see https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields - type: boolean - managedMetadata: - description: |- - ManagedMetadata defines metadata that will be added to the all objects - created by operator for the given CustomResource - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: + livenessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + logFormat: + enum: + - default + - json type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - type: object - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - nodeSelector: - additionalProperties: - type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - podMetadata: - description: PodMetadata configures Labels and Annotations which are - propagated to the VLSingle pods. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - port: - description: Port listen address - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods - type: string - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod condition - properties: - conditionType: - description: ConditionType refers to a condition in the pod's - condition list with matching type. + logIngestedRows: + type: boolean + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC type: string - required: - - conditionType - type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. + logNewStreams: + type: boolean + maintenanceInsertNodeIDs: + items: + format: int32 + type: integer + type: array + maintenanceSelectNodeIDs: + items: + format: int32 + type: integer + type: array + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + persistentVolumeClaimRetentionPolicy: properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. + whenDeleted: type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. + whenScaled: type: string - required: - - name type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - retentionMaxDiskSpaceUsageBytes: - description: |- - RetentionMaxDiskSpaceUsageBytes for the stored logs - VictoriaLogs keeps at least two last days of data in order to guarantee that the logs for the last day can be returned in queries. - This means that the total disk space usage may exceed the -retention.maxDiskSpaceUsageBytes, - if the size of the last two days of data exceeds the -retention.maxDiskSpaceUsageBytes. - https://docs.victoriametrics.com/victorialogs/#retention-by-disk-space-usage - type: string - retentionPeriod: - description: |- - RetentionPeriod for the stored logs - https://docs.victoriametrics.com/victorialogs/#retention - pattern: ^[0-9]+(h|d|w|y)?$ - type: string - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: - type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - serviceAccountName: - description: ServiceAccountName is the name of the ServiceAccount - to use to run the pods - type: string - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vlsingle VMServiceScrape - spec - required: - - endpoints - type: object - x-kubernetes-preserve-unknown-fields: true - serviceSpec: - description: ServiceSpec that will be added to vlsingle service spec - properties: - metadata: - description: EmbeddedObjectMetadata defines objectMeta for additional - service. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: + podDisruptionBudget: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - spec: - description: |- - ServiceSpec describes the attributes that a user creates on a service. - More info: https://kubernetes.io/docs/concepts/services-networking/service/ - type: object - x-kubernetes-preserve-unknown-fields: true - useAsDefault: - description: |- - UseAsDefault applies changes from given service definition to the main object Service - Changing from headless service to clusterIP or loadbalancer may break cross-component communication - type: boolean - required: - - spec - type: object - startupProbe: - description: StartupProbe that will be added to CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - storage: - description: |- - Storage is the definition of how storage will be used by the VLSingle - by default it`s empty dir - properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: + type: object + podMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + port: type: string - type: array - x-kubernetes-list-type: atomic - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - type: string - required: - - kind - - name - type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: + type: array + readinessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string or nil value indicates that no - VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, - this field can be reset to its previous value (including nil) to cancel the modification. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - storageDataPath: - description: |- - StorageDataPath disables spec.storage option and overrides arg for victoria-logs binary --storageDataPath, - its users responsibility to mount proper device into given path. - type: string - storageMetadata: - description: StorageMeta defines annotations and labels attached to - PVC for given vlsingle CR - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - syslogSpec: - description: SyslogSpec defines syslog listener configuration - properties: - tcpListeners: - description: TCPListeners defines syslog server TCP listener configuration - items: - description: SyslogTCPListener defines configuration for TCP - syslog server listen + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + retentionMaxDiskSpaceUsageBytes: + type: string + retentionPeriod: + pattern: ^[0-9]+(h|d|w|y)?$ + type: string + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdateStrategy: + type: string + rollingUpdateStrategyBehavior: properties: - compressMethod: - description: |- - CompressMethod for syslog messages - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#compression - pattern: ^(none|zstd|gzip|deflate)$ - type: string - decolorizeFields: - description: |- - DecolorizeFields to remove ANSI color codes across logs - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#decolorizing-fields - type: string - ignoreFields: - description: |- - IgnoreFields to ignore at logs - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#dropping-fields - type: string - listenPort: - description: ListenPort defines listen port - format: int32 - type: integer - streamFields: - description: |- - StreamFields to use as log stream labels - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#stream-fields - type: string - tenantID: - description: |- - TenantID for logs ingested in form of accountID:projectID - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#multiple-configs - type: string - tlsConfig: - description: TLSServerConfig defines VictoriaMetrics TLS - configuration for the application's server + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + runtimeClassName: + type: string + schedulerName: + type: string + secrets: + items: + type: string + type: array + securityContext: + type: object + x-kubernetes-preserve-unknown-fields: true + serviceScrapeSpec: + required: + - endpoints + type: object + x-kubernetes-preserve-unknown-fields: true + serviceSpec: + properties: + metadata: properties: - certFile: - description: |- - CertFile defines path to the pre-mounted file with certificate - mutually exclusive with CertSecret - type: string - certSecret: - description: |- - CertSecretRef defines reference for secret with certificate content under given key - mutually exclusive with CertFile - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key + annotations: + additionalProperties: + type: string type: object - x-kubernetes-map-type: atomic - keyFile: - description: |- - KeyFile defines path to the pre-mounted file with certificate key - mutually exclusive with KeySecretRef - type: string - keySecret: - description: |- - Key defines reference for secret with certificate key content under given key - mutually exclusive with KeyFile - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key + labels: + additionalProperties: + type: string type: object - x-kubernetes-map-type: atomic + name: + type: string + type: object + spec: type: object + x-kubernetes-preserve-unknown-fields: true + useAsDefault: + type: boolean required: - - listenPort + - spec type: object - type: array - udpListeners: - description: UDPListeners defines syslog server UDP listener configuration - items: - description: SyslogUDPListener defines configuration for UDP - syslog server listen + startupProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + storage: properties: - compressMethod: - description: |- - CompressMethod for syslog messages - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#compression - pattern: ^(none|zstd|gzip|deflate)$ - type: string - decolorizeFields: - description: |- - DecolorizeFields to remove ANSI color codes across logs - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#decolorizing-fields - type: string - ignoreFields: - description: |- - IgnoreFields to ignore at logs - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#dropping-fields - type: string - listenPort: - description: ListenPort defines listen port - format: int32 - type: integer - streamFields: - description: |- - StreamFields to use as log stream labels - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#stream-fields - type: string - tenantID: - description: |- - TenantID for logs ingested in form of accountID:projectID - see https://docs.victoriametrics.com/victorialogs/data-ingestion/syslog/#multiple-configs - type: string - required: - - listenPort + disableMountSubPath: + type: boolean + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + volumeClaimTemplate: + type: object + x-kubernetes-preserve-unknown-fields: true type: object - type: array - type: object - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container graceful - termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread matching - pods among the given topology. - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. + storageDataPath: type: string - required: - - mountPath - - name - type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that may - be accessed by any container in the pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - type: object - status: - description: VLSingleStatus defines the observed state of VLSingle - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. + terminationGracePeriodSeconds: format: int64 - minimum: 0 type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 - type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.18.0 - name: vmagents.operator.victoriametrics.com -spec: - group: operator.victoriametrics.com - names: - kind: VMAgent - listKind: VMAgentList - plural: vmagents - singular: vmagent - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: current number of shards - jsonPath: .status.shards - name: Shards Count - type: integer - - description: current number of replicas - jsonPath: .status.replicas - name: Replica Count - type: integer - - description: Current status of update rollout - jsonPath: .status.updateStatus - name: Status - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1beta1 - schema: - openAPIV3Schema: - description: |- - VMAgent - is a tiny but brave agent, which helps you collect metrics from various sources and stores them in VictoriaMetrics - or any other Prometheus-compatible storage system that supports the remote_write protocol. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VMAgentSpec defines the desired state of VMAgent - properties: - aPIServerConfig: - description: |- - APIServerConfig allows specifying a host and auth methods to access apiserver. - If left empty, VMAgent is assumed to run inside of the cluster - and will discover API servers automatically and use the pod's CA certificate - and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/. - aPIServerConfig is deprecated use apiServerConfig instead - required: - - host - type: object - x-kubernetes-preserve-unknown-fields: true - additionalScrapeConfigs: - description: |- - AdditionalScrapeConfigs As scrape configs are appended, the user is responsible to make sure it - is valid. Note that using this feature may expose the possibility to - break upgrades of VMAgent. It is advised to review VMAgent release - notes to ensure that no incompatible scrape configs are going to break - VMAgent after the upgrade. - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - apiServerConfig: - description: |- - APIServerConfig allows specifying a host and auth methods to access apiserver. - If left empty, VMAgent is assumed to run inside of the cluster - and will discover API servers automatically and use the pod's CA certificate - and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/. - properties: - authorization: - description: Authorization configures generic authorization params - properties: - credentials: - description: Reference to the secret with value for authorization + tolerations: + items: properties: + effect: + type: string key: - description: The key of the secret to select from. Must - be a valid secret key. type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key type: object - x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization + type: array + topologySpreadConstraints: + items: + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown type: string type: - description: Type of authorization, default to bearer + maxLength: 316 type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type type: object - basicAuth: - description: BasicAuth allow an endpoint to authenticate over - basic authentication + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.18.0 + name: vlogs.operator.victoriametrics.com +spec: + group: operator.victoriametrics.com + names: + kind: VLogs + listKind: VLogsList + plural: vlogs + singular: vlogs + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + required: + - retentionPeriod + type: object + x-kubernetes-preserve-unknown-fields: true + status: + properties: + conditions: + items: properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.18.0 + name: vlsingles.operator.victoriametrics.com +spec: + group: operator.victoriametrics.com + names: + kind: VLSingle + listKind: VLSingleList + plural: vlsingles + singular: vlsingle + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + affinity: + type: object + x-kubernetes-preserve-unknown-fields: true + configMaps: + items: + type: string + type: array + containers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key + value: + type: string type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted + type: array + x-kubernetes-list-type: atomic + searches: + items: type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + extraEnvsFrom: + items: + properties: + configMapRef: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean - required: - - key type: object x-kubernetes-map-type: atomic - type: object - bearerToken: - description: Bearer token for accessing apiserver. - type: string - bearerTokenFile: - description: File to read bearer token for accessing apiserver. - type: string - host: - description: |- - Host of apiserver. - A valid string consisting of a hostname or IP followed by an optional port number - type: string - tlsConfig: - description: TLSConfig Config to use for accessing apiserver. - properties: - ca: - description: Struct containing the CA cert to use for the - targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container to use for - the targets. - type: string - cert: - description: Struct containing the client cert file for the - targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the container - for the targets. + prefix: type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container - for the targets. - type: string - keySecret: - description: Secret containing the client key file for the - targets. + secretRef: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean - required: - - key type: object x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. + type: object + type: array + futureRetention: + pattern: ^[0-9]+(h|d|y)?$ + type: string + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: type: string + required: + - ip type: object - required: - - host - type: object - arbitraryFSAccessThroughSMs: - description: |- - ArbitraryFSAccessThroughSMs configures whether configuration - based on EndpointAuth can access arbitrary files on the file system - of the VMAgent container e.g. bearer token files, basic auth, tls certs - properties: - deny: - type: boolean - type: object - claimTemplates: - description: ClaimTemplates allows adding additional VolumeClaimTemplates - for VMAgent in StatefulMode - items: - description: PersistentVolumeClaim is a user's request for and claim - to a persistent volume + type: array + hostNetwork: + type: boolean + image: properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + pullPolicy: + type: string + repository: + type: string + tag: type: string - metadata: - description: |- - Standard object's metadata. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - type: object - x-kubernetes-preserve-unknown-fields: true - spec: - description: |- - spec defines the desired characteristics of a volume requested by a pod author. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - x-kubernetes-list-type: atomic - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - type: string - required: - - kind - - name - type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string or nil value indicates that no - VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, - this field can be reset to its previous value (including nil) to cancel the modification. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the - PersistentVolume backing this claim. - type: string - type: object - status: - description: |- - status represents the current information/status of a persistent volume claim. - Read-only. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the actual access modes the volume backing the PVC has. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - x-kubernetes-list-type: atomic - allocatedResourceStatuses: - additionalProperties: - description: |- - When a controller receives persistentvolume claim update with ClaimResourceStatus for a resource - that it does not recognizes, then it should ignore that update and let other controllers - handle it. - type: string - description: "allocatedResourceStatuses stores status of - resource being resized for the given PVC.\nKey names follow - standard Kubernetes label syntax. Valid values are either:\n\t* - Un-prefixed keys:\n\t\t- storage - the capacity of the - volume.\n\t* Custom resources must use implementation-defined - prefixed names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or have kubernetes.io - prefix are considered\nreserved and hence may not be used.\n\nClaimResourceStatus - can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState - set when resize controller starts resizing the volume - in control-plane.\n\t- ControllerResizeFailed:\n\t\tState - set when resize has failed in resize controller with a - terminal error.\n\t- NodeResizePending:\n\t\tState set - when resize controller has finished resizing the volume - but further resizing of\n\t\tvolume is needed on the node.\n\t- - NodeResizeInProgress:\n\t\tState set when kubelet starts - resizing the volume.\n\t- NodeResizeFailed:\n\t\tState - set when resizing has failed in kubelet with a terminal - error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor - example: if expanding a PVC for more capacity - this field - can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeFailed\"\nWhen this field is not set, it - means that no resize operation is in progress for the - given PVC.\n\nA controller that receives PVC update with - previously unknown resourceName or ClaimResourceStatus\nshould - ignore the update for the purpose it was designed. For - example - a controller that\nonly is responsible for resizing - capacity of the volume, should ignore PVC updates that - change other valid\nresources associated with PVC.\n\nThis - is an alpha field and requires enabling RecoverVolumeExpansionFailure - feature." - type: object - x-kubernetes-map-type: granular - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: "allocatedResources tracks the resources allocated - to a PVC including its capacity.\nKey names follow standard - Kubernetes label syntax. Valid values are either:\n\t* - Un-prefixed keys:\n\t\t- storage - the capacity of the - volume.\n\t* Custom resources must use implementation-defined - prefixed names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or have kubernetes.io - prefix are considered\nreserved and hence may not be used.\n\nCapacity - reported here may be larger than the actual capacity when - a volume expansion operation\nis requested.\nFor storage - quota, the larger value from allocatedResources and PVC.spec.resources - is used.\nIf allocatedResources is not set, PVC.spec.resources - alone is used for quota calculation.\nIf a volume expansion - capacity request is lowered, allocatedResources is only\nlowered - if there are no expansion operations in progress and if - the actual volume capacity\nis equal or lower than the - requested capacity.\n\nA controller that receives PVC - update with previously unknown resourceName\nshould ignore - the update for the purpose it was designed. For example - - a controller that\nonly is responsible for resizing - capacity of the volume, should ignore PVC updates that - change other valid\nresources associated with PVC.\n\nThis - is an alpha field and requires enabling RecoverVolumeExpansionFailure - feature." - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: capacity represents the actual resources of - the underlying volume. - type: object - conditions: - description: |- - conditions is the current Condition of persistent volume claim. If underlying persistent volume is being - resized then the Condition will be set to 'Resizing'. - items: - description: PersistentVolumeClaimCondition contains details - about state of pvc - properties: - lastProbeTime: - description: lastProbeTime is the time we probed the - condition. - format: date-time - type: string - lastTransitionTime: - description: lastTransitionTime is the time the condition - transitioned from one status to another. - format: date-time - type: string - message: - description: message is the human-readable message - indicating details about last transition. - type: string - reason: - description: |- - reason is a unique, this should be a short, machine understandable string that gives the reason - for condition's last transition. If it reports "Resizing" that means the underlying - persistent volume is being resized. - type: string - status: - description: |- - Status is the status of the condition. - Can be True, False, Unknown. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required - type: string - type: - description: |- - Type is the type of the condition. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about - type: string - required: - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - currentVolumeAttributesClassName: - description: |- - currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. - When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim - type: string - modifyVolumeStatus: - description: |- - ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. - When this is unset, there is no ModifyVolume operation being attempted. - properties: - status: - description: "status is the status of the ControllerModifyVolume - operation. It can be in any of following states:\n - - Pending\n Pending indicates that the PersistentVolumeClaim - cannot be modified due to unmet requirements, such - as\n the specified VolumeAttributesClass not existing.\n - - InProgress\n InProgress indicates that the volume - is being modified.\n - Infeasible\n Infeasible indicates - that the request has been rejected as invalid by the - CSI driver. To\n\t resolve the error, a valid VolumeAttributesClass - needs to be specified.\nNote: New statuses can be - added in the future. Consumers should check for unknown - statuses and fail appropriately." - type: string - targetVolumeAttributesClassName: - description: targetVolumeAttributesClassName is the - name of the VolumeAttributesClass the PVC currently - being reconciled - type: string - required: - - status - type: object - phase: - description: phase represents the current phase of PersistentVolumeClaim. - type: string - type: object type: object - type: array - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: - type: string - type: array - configReloadAuthKeySecret: - description: |- - ConfigReloadAuthKeySecret defines optional secret reference authKey for /-/reload API requests. - Given secret reference will be added to the application and vm-config-reloader as volume - available since v0.57.0 version - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - configReloaderExtraArgs: - additionalProperties: - type: string - description: |- - ConfigReloaderExtraArgs that will be passed to VMAuths config-reloader container - for example resyncInterval: "30s" - type: object - configReloaderImageTag: - description: ConfigReloaderImageTag defines image:tag for config-reloader - container - type: string - configReloaderResources: - description: |- - ConfigReloaderResources config-reloader container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + imagePullSecrets: + items: + properties: + name: + default: "" + type: string type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + required: + - name type: object - type: object - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to run - within a pod. - required: - - name + x-kubernetes-preserve-unknown-fields: true + type: array + livenessProbe: type: object x-kubernetes-preserve-unknown-fields: true - type: array - daemonSetMode: - description: |- - DaemonSetMode enables DaemonSet deployment mode instead of Deployment. - Supports only VMPodScrape - (available from v0.55.0). - Cannot be used with statefulMode - type: boolean - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: - x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. - properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this DNS resolver option's value. - type: string - type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - enableKubernetesAPISelectors: - description: |- - EnableKubernetesAPISelectors instructs vmagent to use CRD scrape objects spec.selectors for - Kubernetes API list and watch requests. - https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#list-and-watch-filtering - It could be useful to reduce Kubernetes API server resource usage for serving less than 100 CRD scrape objects in total. - type: boolean - enforcedNamespaceLabel: - description: |- - EnforcedNamespaceLabel enforces adding a namespace label of origin for each alert - and metric that is user created. The label value will always be the namespace of the object that is - being created. - type: string - externalLabels: - additionalProperties: + logFormat: + enum: + - default + - json type: string - description: |- - ExternalLabels The labels to add to any time series scraped by vmagent. - it doesn't affect metrics ingested directly by push API's - type: object - extraArgs: - additionalProperties: + logIngestedRows: + type: boolean + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application container - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of ConfigMaps - or Secrets + logNewStreams: + type: boolean + managedMetadata: properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean + annotations: + additionalProperties: + type: string type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean + labels: + additionalProperties: + type: string type: object - x-kubernetes-map-type: atomic type: object - type: array - globalScrapeMetricRelabelConfigs: - description: GlobalScrapeMetricRelabelConfigs is a global metric relabel - configuration, which is applied to each scrape job. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + podMetadata: properties: - action: - description: Action to perform based on regex matching. Default - is 'replace' - type: string - if: - description: 'If represents metricsQL match expression (or list - of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: + annotations: additionalProperties: type: string - description: 'Labels is used together with Match for `action: - graphite`' type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source label - values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source label - values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: - type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - globalScrapeRelabelConfigs: - description: GlobalScrapeRelabelConfigs is a global relabel configuration, - which is applied to each samples of each scrape job during service - discovery. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling - properties: - action: - description: Action to perform based on regex matching. Default - is 'replace' - type: string - if: - description: 'If represents metricsQL match expression (or list - of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true labels: additionalProperties: type: string - description: 'Labels is used together with Match for `action: - graphite`' type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source label - values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source label - values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: - type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the node - network namespace - type: boolean - ignoreNamespaceSelectors: - description: |- - IgnoreNamespaceSelectors if set to true will ignore NamespaceSelector settings from - scrape objects, and they will only discover endpoints - within their current namespace. Defaults to false. - type: boolean - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image + it's repository - if needed - type: string - tag: - description: Tag contains desired docker image version - type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string type: object - x-kubernetes-map-type: atomic - type: array - ingestOnlyMode: - description: |- - IngestOnlyMode switches vmagent into unmanaged mode - it disables any config generation for scraping - Currently it prevents vmagent from managing tls and auth options for remote write - type: boolean - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to run - within a pod. - required: - - name + port: + type: string + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + readinessProbe: type: object x-kubernetes-preserve-unknown-fields: true - type: array - inlineRelabelConfig: - description: InlineRelabelConfig - defines GlobalRelabelConfig for - vmagent, can be defined directly at CRD. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling + replicaCount: + format: int32 + type: integer + resources: properties: - action: - description: Action to perform based on regex matching. Default - is 'replace' - type: string - if: - description: 'If represents metricsQL match expression (or list - of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for `action: - graphite`' - type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source label - values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source label - values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. + claims: items: - type: string + properties: + name: + type: string + request: + type: string + required: + - name + type: object type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - inlineScrapeConfig: - description: |- - InlineScrapeConfig As scrape configs are appended, the user is responsible to make sure it - is valid. Note that using this feature may expose the possibility to - break upgrades of VMAgent. It is advised to review VMAgent release - notes to ensure that no incompatible scrape configs are going to break - VMAgent after the upgrade. - it should be defined as single yaml file. - inlineScrapeConfig: | - - job_name: "prometheus" - static_configs: - - targets: ["localhost:9090"] - type: string - insertPorts: - description: InsertPorts - additional listen ports for data ingestion. - properties: - graphitePort: - description: GraphitePort listen port - type: string - influxPort: - description: InfluxPort listen port - type: string - openTSDBHTTPPort: - description: OpenTSDBHTTPPort for http connections. - type: string - openTSDBPort: - description: OpenTSDBPort for tcp and udp listen - type: string - type: object - license: - description: |- - License allows to configure license key to be used for enterprise features. - Using license key is supported starting from VictoriaMetrics v1.94.0. - See [here](https://docs.victoriametrics.com/victoriametrics/enterprise/) - properties: - forceOffline: - description: Enforce offline verification of the license key. - type: boolean - key: - description: |- - Enterprise license key. This flag is available only in [VictoriaMetrics enterprise](https://docs.victoriametrics.com/victoriametrics/enterprise/). - To request a trial license, [go to](https://victoriametrics.com/products/enterprise/trial) - type: string - keyRef: - description: KeyRef is reference to secret with license key for - enterprise features. - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - reloadInterval: - description: Interval to be used for checking for license key - changes. Note that this is only applicable when using KeyRef. + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + retentionMaxDiskSpaceUsageBytes: + type: string + retentionPeriod: + pattern: ^[0-9]+(h|d|w|y)?$ + type: string + revisionHistoryLimitCount: + format: int32 + type: integer + runtimeClassName: + type: string + schedulerName: + type: string + secrets: + items: type: string - type: object - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logFormat: - description: LogFormat for VMAgent to be configured with. - enum: - - default - - json - type: string - logLevel: - description: |- - LogLevel for VMAgent to be configured with. - INFO, WARN, ERROR, FATAL, PANIC - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - managedMetadata: - description: |- - ManagedMetadata defines metadata that will be added to the all objects - created by operator for the given CustomResource - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - type: object - maxScrapeInterval: - description: |- - MaxScrapeInterval allows limiting maximum scrape interval for VMServiceScrape, VMPodScrape and other scrapes - If interval is higher than defined limit, `maxScrapeInterval` will be used. - type: string - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - minScrapeInterval: - description: |- - MinScrapeInterval allows limiting minimal scrape interval for VMServiceScrape, VMPodScrape and other scrapes - If interval is lower than defined limit, `minScrapeInterval` will be used. - type: string - nodeScrapeNamespaceSelector: - description: |- - NodeScrapeNamespaceSelector defines Namespaces to be selected for VMNodeScrape discovery. - Works in combination with Selector. - NamespaceSelector nil - only objects at VMAgent namespace. - Selector nil - only objects at NamespaceSelector namespaces. - If both nil - behaviour controlled by selectAllByDefault - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. + type: array + securityContext: + type: object + x-kubernetes-preserve-unknown-fields: true + serviceAccountName: + type: string + serviceScrapeSpec: + required: + - endpoints + type: object + x-kubernetes-preserve-unknown-fields: true + serviceSpec: + properties: + metadata: properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: + annotations: + additionalProperties: type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - nodeScrapeRelabelTemplate: - description: |- - NodeScrapeRelabelTemplate defines relabel config, that will be added to each VMNodeScrape. - it's useful for adding specific labels to all targets - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling - properties: - action: - description: Action to perform based on regex matching. Default - is 'replace' - type: string - if: - description: 'If represents metricsQL match expression (or list - of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for `action: - graphite`' + spec: type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source label - values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source label - values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. + useAsDefault: + type: boolean + required: + - spec + type: object + startupProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + storage: + properties: + accessModes: items: type: string type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - nodeScrapeSelector: - description: |- - NodeScrapeSelector defines VMNodeScrape to be selected for scraping. - Works in combination with NamespaceSelector. - NamespaceSelector nil - only objects at VMAgent namespace. - Selector nil - only objects at NamespaceSelector namespaces. - If both nil - behaviour controlled by selectAllByDefault - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. + x-kubernetes-list-type: atomic + dataSource: properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic + apiGroup: + type: string + kind: + type: string + name: + type: string required: - - key - - operator + - kind + - name type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - nodeSelector: - additionalProperties: - type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - overrideHonorLabels: - description: |- - OverrideHonorLabels if set to true overrides all user configured honor_labels. - If HonorLabels is set in scrape objects to true, this overrides honor_labels to false. - type: boolean - overrideHonorTimestamps: - description: OverrideHonorTimestamps allows to globally enforce honoring - timestamps in all scrape configs. - type: boolean - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - persistentVolumeClaimRetentionPolicy: - description: PersistentVolumeClaimRetentionPolicy allows configuration - of PVC retention policy - properties: - whenDeleted: - description: |- - WhenDeleted specifies what happens to PVCs created from StatefulSet - VolumeClaimTemplates when the StatefulSet is deleted. The default policy - of `Retain` causes PVCs to not be affected by StatefulSet deletion. The - `Delete` policy causes those PVCs to be deleted. - type: string - whenScaled: - description: |- - WhenScaled specifies what happens to PVCs created from StatefulSet - VolumeClaimTemplates when the StatefulSet is scaled down. The default - policy of `Retain` causes PVCs to not be affected by a scaledown. The - `Delete` policy causes the associated PVCs for any excess pods above - the replica count to be deleted. - type: string - type: object - podDisruptionBudget: - description: PodDisruptionBudget created by operator - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at most "maxUnavailable" pods selected by - "selector" are unavailable after the eviction, i.e. even in absence of - the evicted pod. For example, one can prevent all voluntary evictions - by specifying 0. This is a mutually exclusive setting with "minAvailable". - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at least "minAvailable" pods selected by - "selector" will still be available after the eviction, i.e. even in the - absence of the evicted pod. So for example you can prevent all voluntary - evictions by specifying "100%". - x-kubernetes-int-or-string: true - selectorLabels: - additionalProperties: - type: string - description: |- - replaces default labels selector generated by operator - it's useful when you need to create custom budget - type: object - unhealthyPodEvictionPolicy: - description: |- - UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods - - Valid policies are IfHealthyBudget and AlwaysAllow. - If no policy is specified, the default behavior will be used, - which corresponds to the IfHealthyBudget policy. - Available from operator v0.64.0 - enum: - - IfHealthyBudget - - AlwaysAllow - type: string - type: object - podMetadata: - description: PodMetadata configures Labels and Annotations which are - propagated to the vmagent pods. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - podScrapeNamespaceSelector: - description: |- - PodScrapeNamespaceSelector defines Namespaces to be selected for VMPodScrape discovery. - Works in combination with Selector. - NamespaceSelector nil - only objects at VMAgent namespace. - Selector nil - only objects at NamespaceSelector namespaces. - If both nil - behaviour controlled by selectAllByDefault - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. + x-kubernetes-map-type: atomic + dataSourceRef: properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - podScrapeRelabelTemplate: - description: |- - PodScrapeRelabelTemplate defines relabel config, that will be added to each VMPodScrape. - it's useful for adding specific labels to all targets - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling - properties: - action: - description: Action to perform based on regex matching. Default - is 'replace' - type: string - if: - description: 'If represents metricsQL match expression (or list - of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for `action: - graphite`' + - kind + - name type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source label - values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source label - values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: - type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - podScrapeSelector: - description: |- - PodScrapeSelector defines PodScrapes to be selected for target discovery. - Works in combination with NamespaceSelector. - NamespaceSelector nil - only objects at VMAgent namespace. - Selector nil - only objects at NamespaceSelector namespaces. - If both nil - behaviour controlled by selectAllByDefault - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. + resources: properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - port: - description: Port listen address - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods - type: string - probeNamespaceSelector: - description: |- - ProbeNamespaceSelector defines Namespaces to be selected for VMProbe discovery. - Works in combination with Selector. - NamespaceSelector nil - only objects at VMAgent namespace. - Selector nil - only objects at NamespaceSelector namespaces. - If both nil - behaviour controlled by selectAllByDefault - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. + selector: properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. + matchExpressions: items: - type: string + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object type: array x-kubernetes-list-type: atomic - required: - - key - - operator + matchLabels: + additionalProperties: + type: string + type: object type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - probeScrapeRelabelTemplate: - description: |- - ProbeScrapeRelabelTemplate defines relabel config, that will be added to each VMProbeScrape. - it's useful for adding specific labels to all targets - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling - properties: - action: - description: Action to perform based on regex matching. Default - is 'replace' + x-kubernetes-map-type: atomic + storageClassName: type: string - if: - description: 'If represents metricsQL match expression (or list - of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for `action: - graphite`' - type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' + volumeAttributesClassName: type: string - modulus: - description: Modulus to take of the hash of the source label - values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' + volumeMode: type: string - separator: - description: Separator placed between concatenated source label - values. default is ';'. + volumeName: type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: + type: object + storageDataPath: + type: string + storageMetadata: + properties: + annotations: + additionalProperties: type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: + type: object + labels: + additionalProperties: type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - probeSelector: - description: |- - ProbeSelector defines VMProbe to be selected for target probing. - Works in combination with NamespaceSelector. - NamespaceSelector nil - only objects at VMAgent namespace. - Selector nil - only objects at NamespaceSelector namespaces. - If both nil - behaviour controlled by selectAllByDefault - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod condition - properties: - conditionType: - description: ConditionType refers to a condition in the pod's - condition list with matching type. + name: type: string - required: - - conditionType - type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - relabelConfig: - description: |- - RelabelConfig ConfigMap with global relabel config -remoteWrite.relabelConfig - This relabeling is applied to all the collected metrics before sending them to remote storage. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - remoteWrite: - description: |- - RemoteWrite list of victoria metrics /some other remote write system - for vm it must looks like: http://victoria-metrics-single:8428/api/v1/write - or for cluster different url - https://docs.victoriametrics.com/victoriametrics/vmagent/#splitting-data-streams-among-multiple-systems - items: - description: VMAgentRemoteWriteSpec defines the remote storage configuration - for VmAgent + type: object + syslogSpec: properties: - aws: - description: AWS describes params specific to AWS cloud - properties: - ec2Endpoint: - description: EC2Endpoint is an optional AWS EC2 API endpoint - to use for the corresponding -remoteWrite.url if -remoteWrite.aws.useSigv4 - is set - type: string - region: - description: Region is an optional AWS region to use for - the corresponding -remoteWrite.url if -remoteWrite.aws.useSigv4 - is set - type: string - roleARN: - description: RoleARN is an optional AWS region to use for - the corresponding -remoteWrite.url if -remoteWrite.aws.useSigv4 - is set - type: string - service: - description: Service is an optional AWS Service to use for - the corresponding -remoteWrite.url if -remoteWrite.aws.useSigv4 - is set - type: string - stsEndpoint: - description: STSEndpoint is an optional AWS STS API endpoint - to use for the corresponding -remoteWrite.url if -remoteWrite.aws.useSigv4 - is set - type: string - useSigv4: - description: UseSigv4 enables SigV4 request signing for - the corresponding -remoteWrite.url - type: boolean - type: object - basicAuth: - description: BasicAuth allow an endpoint to authenticate over - basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string + tcpListeners: + items: + properties: + compressMethod: + pattern: ^(none|zstd|gzip|deflate)$ + type: string + decolorizeFields: + type: string + ignoreFields: + type: string + listenPort: + format: int32 + type: integer + streamFields: + type: string + tenantID: + type: string + tlsConfig: + properties: + certFile: + type: string + certSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - listenPort + type: object + type: array + udpListeners: + items: + properties: + compressMethod: + pattern: ^(none|zstd|gzip|deflate)$ + type: string + decolorizeFields: + type: string + ignoreFields: + type: string + listenPort: + format: int32 + type: integer + streamFields: + type: string + tenantID: + type: string + required: + - listenPort + type: object + type: array + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.18.0 + name: vmagents.operator.victoriametrics.com +spec: + group: operator.victoriametrics.com + names: + kind: VMAgent + listKind: VMAgentList + plural: vmagents + singular: vmagent + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.shards + name: Shards Count + type: integer + - jsonPath: .status.replicas + name: Replica Count + type: integer + - jsonPath: .status.updateStatus + name: Status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + aPIServerConfig: + required: + - host + type: object + x-kubernetes-preserve-unknown-fields: true + additionalScrapeConfigs: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + affinity: + type: object + x-kubernetes-preserve-unknown-fields: true + apiServerConfig: + properties: + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted + credentialsFile: type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object + type: + type: string + type: object + basicAuth: + properties: + password: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - type: object - bearerTokenSecret: - description: Optional bearer auth token to use for -remoteWrite.url - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + password_file: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - forceVMProto: - description: ForceVMProto forces using VictoriaMetrics protocol - for sending data to -remoteWrite.url - type: boolean - headers: - description: |- - Headers allow configuring custom http headers - Must be in form of semicolon separated header with value - e.g. - headerName: headerValue - vmagent supports since 1.79.0 version - items: - type: string - type: array - inlineUrlRelabelConfig: - description: InlineUrlRelabelConfig defines relabeling config - for remoteWriteURL, it can be defined at crd spec. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling - properties: - action: - description: Action to perform based on regex matching. - Default is 'replace' - type: string - if: - description: 'If represents metricsQL match expression - (or list of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for `action: - graphite`' - type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source - label values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source - label values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: + username: + properties: + key: type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: + name: + default: "" type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - maxDiskUsage: - description: |- - MaxDiskUsage defines the maximum file-based buffer size in bytes for the given remoteWrite - It overrides global configuration defined at remoteWriteSettings.maxDiskUsagePerURL - x-kubernetes-preserve-unknown-fields: true - oauth2: - description: OAuth2 defines auth configuration + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearerToken: + type: string + bearerTokenFile: + type: string + host: + type: string + tlsConfig: properties: - client_id: - description: The secret or configmap containing the OAuth2 - client id + ca: properties: configMap: - description: ConfigMap containing data to use for the - targets. properties: key: - description: The key to select. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the ConfigMap or its - key must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic secret: - description: Secret containing data to use for the targets. properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key - must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic type: object - client_secret: - description: The secret containing the OAuth2 client secret - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - client_secret_file: - description: ClientSecretFile defines path for client secret - file. - type: string - endpoint_params: - additionalProperties: - type: string - description: Parameters to append to the token URL - type: object - proxy_url: - description: |- - The proxy URL for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - type: string - scopes: - description: OAuth2 scopes used for the token request - items: - type: string - type: array - tls_config: - description: |- - TLSConfig for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - x-kubernetes-preserve-unknown-fields: true - token_url: - description: The URL to fetch the token from - minLength: 1 - type: string - required: - - client_id - - token_url - type: object - proxyURL: - description: 'ProxyURL for -remoteWrite.url. Supported proxies: - http, https, socks5. Example: socks5://proxy:1234' - type: string - sendTimeout: - description: Timeout for sending a single block of data to -remoteWrite.url - (default 1m0s) - pattern: '[0-9]+(ms|s|m|h)' - type: string - streamAggrConfig: - description: StreamAggrConfig defines stream aggregation configuration - for VMAgent for -remoteWrite.url - properties: - configmap: - description: ConfigMap with stream aggregation rules - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - dedupInterval: - description: Allows setting different de-duplication intervals - per each configured remote storage - type: string - dropInput: - description: Allow drop all the input samples after the - aggregation - type: boolean - dropInputLabels: - description: labels to drop from samples for aggregator - before stream de-duplication and aggregation - items: - type: string - type: array - enableWindows: - description: EnableWindows enables aggregating data in separate - windows ( available from v0.54.0). - type: boolean - ignoreFirstIntervals: - description: IgnoreFirstIntervals instructs to ignore first - interval - type: integer - ignoreFirstSampleInterval: - description: IgnoreFirstSampleInterval sets interval for - total and prometheus_total during which first samples - will be ignored - type: string - ignoreOldSamples: - description: IgnoreOldSamples instructs to ignore samples - with old timestamps outside the current aggregation interval. - type: boolean - keepInput: - description: Allows writing both raw and aggregate data - type: boolean - rules: - description: Stream aggregation rules - items: - description: StreamAggrRule defines the rule in stream - aggregation config - properties: - by: - description: |- - By is an optional list of labels for grouping input series. - - See also Without. - - If neither By nor Without are set, then the Outputs are calculated - individually per each input time series. - items: - type: string - type: array - dedup_interval: - description: DedupInterval is an optional interval - for deduplication. - type: string - drop_input_labels: - description: |- - DropInputLabels is an optional list with labels, which must be dropped before further processing of input samples. - - Labels are dropped before de-duplication and aggregation. - items: - type: string - type: array - enable_windows: - description: EnableWindows enables aggregating data - in separate windows - type: boolean - flush_on_shutdown: - description: |- - FlushOnShutdown defines whether to flush the aggregation state on process termination - or config reload. Is `false` by default. - It is not recommended changing this setting, unless unfinished aggregations states - are preferred to missing data points. - type: boolean - ignore_first_intervals: - type: integer - ignore_old_samples: - description: IgnoreOldSamples instructs to ignore - samples with old timestamps outside the current - aggregation interval. - type: boolean - ignoreFirstSampleInterval: - description: IgnoreFirstSampleInterval sets interval - for total and prometheus_total during which first - samples will be ignored - type: string - input_relabel_configs: - description: |- - InputRelabelConfigs is an optional relabeling rules, which are applied on the input - before aggregation. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling - properties: - action: - description: Action to perform based on regex - matching. Default is 'replace' - type: string - if: - description: 'If represents metricsQL match - expression (or list of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match - for `action: graphite`' - type: object - match: - description: 'Match is used together with Labels - for `action: graphite`' - type: string - modulus: - description: Modulus to take of the hash of - the source label values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated - source label values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: - type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - interval: - description: Interval is the interval between aggregations. - type: string - keep_metric_names: - description: KeepMetricNames instructs to leave metric - names as is for the output time series without adding - any suffix. - type: boolean - match: - description: |- - Match is a label selector (or list of label selectors) for filtering time series for the given selector. - - If the match isn't set, then all the input time series are processed. - x-kubernetes-preserve-unknown-fields: true - no_align_flush_to_interval: - description: |- - NoAlignFlushToInterval disables aligning of flushes to multiples of Interval. - By default flushes are aligned to Interval. - type: boolean - output_relabel_configs: - description: |- - OutputRelabelConfigs is an optional relabeling rules, which are applied - on the aggregated output before being sent to remote storage. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling - properties: - action: - description: Action to perform based on regex - matching. Default is 'replace' - type: string - if: - description: 'If represents metricsQL match - expression (or list of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match - for `action: graphite`' - type: object - match: - description: 'Match is used together with Labels - for `action: graphite`' - type: string - modulus: - description: Modulus to take of the hash of - the source label values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated - source label values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: - type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - outputs: - description: |- - Outputs is a list of output aggregate functions to produce. - - The following names are allowed: - - - total - aggregates input counters - - increase - counts the increase over input counters - - count_series - counts the input series - - count_samples - counts the input samples - - sum_samples - sums the input samples - - last - the last biggest sample value - - min - the minimum sample value - - max - the maximum sample value - - avg - the average value across all the samples - - stddev - standard deviation across all the samples - - stdvar - standard variance across all the samples - - histogram_bucket - creates VictoriaMetrics histogram for input samples - - quantiles(phi1, ..., phiN) - quantiles' estimation for phi in the range [0..1] - - The output time series will have the following names: - - input_name:aggr__ - items: - type: string - type: array - staleness_interval: - description: |- - Staleness interval is interval after which the series state will be reset if no samples have been sent during it. - The parameter is only relevant for outputs: total, total_prometheus, increase, increase_prometheus and histogram_bucket. - type: string - without: - description: |- - Without is an optional list of labels, which must be excluded when grouping input series. - - See also By. - - If neither By nor Without are set, then the Outputs are calculated - individually per each input time series. - items: - type: string - type: array - required: - - interval - - outputs - type: object - type: array - type: object - tlsConfig: - description: TLSConfig describes tls configuration for remote - write target - properties: - ca: - description: Struct containing the CA cert to use for the - targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container to use - for the targets. + caFile: type: string cert: - description: Struct containing the client cert file for - the targets. properties: configMap: - description: ConfigMap containing data to use for the - targets. properties: key: - description: The key to select. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the ConfigMap or its - key must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic secret: - description: Secret containing data to use for the targets. properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key - must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic type: object certFile: - description: Path to the client cert file in the container - for the targets. type: string insecureSkipVerify: - description: Disable target certificate validation. type: boolean keyFile: - description: Path to the client key file in the container - for the targets. type: string keySecret: - description: Secret containing the client key file for the - targets. properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic serverName: - description: Used to verify the hostname for the targets. - type: string - type: object - url: - description: URL of the endpoint to send samples to. - type: string - urlRelabelConfig: - description: ConfigMap with relabeling config which is applied - to metrics before sending them to the corresponding -remoteWrite.url - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the ConfigMap or its key must - be defined - type: boolean - required: - - key type: object - x-kubernetes-map-type: atomic required: - - url - type: object - type: array - remoteWriteSettings: - description: RemoteWriteSettings defines global settings for all remoteWrite - urls. - properties: - flushInterval: - description: Interval for flushing the data to remote storage. - (default 1s) - pattern: '[0-9]+(ms|s|m|h)' - type: string - label: - additionalProperties: - type: string - description: Labels in the form 'name=value' to add to all the - metrics before sending them. This overrides the label if it - already exists. - type: object - maxBlockSize: - description: The maximum size in bytes of unpacked request to - send to remote storage - format: int32 - type: integer - maxDiskUsagePerURL: - description: The maximum file-based buffer size in bytes at -remoteWrite.tmpDataPath - x-kubernetes-preserve-unknown-fields: true - queues: - description: The number of concurrent queues - format: int32 - type: integer - showURL: - description: Whether to show -remoteWrite.url in the exported - metrics. It is hidden by default, since it can contain sensitive - auth info - type: boolean - tmpDataPath: - description: Path to directory where temporary data for remote - write component is stored (default vmagent-remotewrite-data) - type: string - useMultiTenantMode: - description: |- - Configures vmagent accepting data via the same multitenant endpoints as vminsert at VictoriaMetrics cluster does, - see [here](https://docs.victoriametrics.com/victoriametrics/vmagent/#multitenancy). - it's global setting and affects all remote storage configurations - type: boolean - type: object - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - rollingUpdate: - description: RollingUpdate - overrides deployment update params. - properties: - maxSurge: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of pods that can be scheduled above the desired number of - pods. - Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - This can not be 0 if MaxUnavailable is 0. - Absolute number is calculated from percentage by rounding up. - Defaults to 25%. - Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when - the rolling update starts, such that the total number of old and new pods do not exceed - 130% of desired pods. Once old pods have been killed, - new ReplicaSet can be scaled up further, ensuring that total number of pods running - at any time during the update is at most 130% of desired pods. - x-kubernetes-int-or-string: true - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of pods that can be unavailable during the update. - Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - Absolute number is calculated from percentage by rounding down. - This can not be 0 if MaxSurge is 0. - Defaults to 25%. - Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods - immediately when the rolling update starts. Once new pods are ready, old ReplicaSet - can be scaled down further, followed by scaling up the new ReplicaSet, ensuring - that the total number of pods available at all times during the update is at - least 70% of desired pods. - x-kubernetes-int-or-string: true - type: object - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - scrapeClasses: - description: |- - ScrapeClasses defines the list of scrape classes to expose to scraping objects such as - PodScrapes, ServiceScrapes, Probes and ScrapeConfigs. - items: + - host + type: object + arbitraryFSAccessThroughSMs: properties: - attachMetadata: - description: |- - AttachMetadata defines additional metadata to the discovered targets. - When the scrape object defines its own configuration, it takes - precedence over the scrape class configuration. - properties: - namespace: - description: |- - Namespace instructs vmagent to add namespace specific metadata from service discovery - Valid for roles: pod, service, endpoints, endpointslice, ingress. - type: boolean - node: - description: |- - Node instructs vmagent to add node specific metadata from service discovery - Valid for roles: pod, endpoints, endpointslice. - type: boolean - type: object - authorization: - description: Authorization with http header Authorization - properties: - credentials: - description: Reference to the secret with value for authorization - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization - type: string - type: - description: Type of authorization, default to bearer - type: string - type: object - basicAuth: - description: BasicAuth allow an endpoint to authenticate over - basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearerTokenFile: - description: File to read bearer token for scraping targets. - type: string - bearerTokenSecret: - description: |- - Secret to mount to read bearer token for scraping targets. The secret - needs to be in the same namespace as the scrape object and accessible by - the victoria-metrics operator. - nullable: true - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - default: - description: |- - default defines that the scrape applies to all scrape objects that - don't configure an explicit scrape class name. - - Only one scrape class can be set as the default. + deny: type: boolean - metricRelabelConfigs: - description: MetricRelabelConfigs to apply to samples after - scrapping. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling - properties: - action: - description: Action to perform based on regex matching. - Default is 'replace' - type: string - if: - description: 'If represents metricsQL match expression - (or list of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: + type: object + claimTemplates: + items: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + x-kubernetes-preserve-unknown-fields: true + spec: + properties: + accessModes: + items: type: string - description: 'Labels is used together with Match for `action: - graphite`' + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: type: string - modulus: - description: Modulus to take of the hash of the source - label values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source - label values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + status: + properties: + accessModes: items: type: string type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: + x-kubernetes-list-type: atomic + allocatedResourceStatuses: + additionalProperties: type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - name: - description: name of the scrape class. - minLength: 1 - type: string - oauth2: - description: OAuth2 defines auth configuration - properties: - client_id: - description: The secret or configmap containing the OAuth2 - client id - properties: - configMap: - description: ConfigMap containing data to use for the - targets. + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + conditions: + items: properties: - key: - description: The key to select. + lastProbeTime: + format: date-time type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + lastTransitionTime: + format: date-time type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + message: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + reason: + type: string + status: + type: string + type: type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean required: - - key + - status + - type type: object - x-kubernetes-map-type: atomic - type: object - client_secret: - description: The secret containing the OAuth2 client secret - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - client_secret_file: - description: ClientSecretFile defines path for client secret - file. - type: string - endpoint_params: - additionalProperties: + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentVolumeAttributesClassName: type: string - description: Parameters to append to the token URL - type: object - proxy_url: - description: |- - The proxy URL for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - type: string - scopes: - description: OAuth2 scopes used for the token request - items: + modifyVolumeStatus: + properties: + status: + type: string + targetVolumeAttributesClassName: + type: string + required: + - status + type: object + phase: type: string - type: array - tls_config: - description: |- - TLSConfig for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - x-kubernetes-preserve-unknown-fields: true - token_url: - description: The URL to fetch the token from - minLength: 1 - type: string - required: - - client_id - - token_url - type: object - relabelConfigs: - description: RelabelConfigs to apply to samples during service - discovery. + type: object + type: object + type: array + configMaps: + items: + type: string + type: array + configReloadAuthKeySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + configReloaderExtraArgs: + additionalProperties: + type: string + type: object + configReloaderImageTag: + type: string + configReloaderResources: + properties: + claims: items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling properties: - action: - description: Action to perform based on regex matching. - Default is 'replace' - type: string - if: - description: 'If represents metricsQL match expression - (or list of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for `action: - graphite`' - type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source - label values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source - label values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: - type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 + name: type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. + request: type: string + required: + - name type: object type: array - tlsConfig: - description: TLSConfig configuration to use when scraping the - endpoint - properties: - ca: - description: Struct containing the CA cert to use for the - targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container to use - for the targets. - type: string - cert: - description: Struct containing the client cert file for - the targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the container - for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container - for the targets. - type: string - keySecret: - description: Secret containing the client key file for the - targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - scrapeConfigNamespaceSelector: - description: |- - ScrapeConfigNamespaceSelector defines Namespaces to be selected for VMScrapeConfig discovery. - Works in combination with Selector. - NamespaceSelector nil - only objects at VMAgent namespace. - Selector nil - only objects at NamespaceSelector namespaces. - If both nil - behaviour controlled by selectAllByDefault - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + containers: + items: + required: + - name type: object - type: object - x-kubernetes-map-type: atomic - scrapeConfigRelabelTemplate: - description: |- - ScrapeConfigRelabelTemplate defines relabel config, that will be added to each VMScrapeConfig. - it's useful for adding specific labels to all targets - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling + x-kubernetes-preserve-unknown-fields: true + type: array + daemonSetMode: + type: boolean + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true properties: - action: - description: Action to perform based on regex matching. Default - is 'replace' - type: string - if: - description: 'If represents metricsQL match expression (or list - of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for `action: - graphite`' - type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source label - values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source label - values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 + nameservers: items: type: string type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. + x-kubernetes-list-type: atomic + options: items: - type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - scrapeConfigSelector: - description: |- - ScrapeConfigSelector defines VMScrapeConfig to be selected for target discovery. - Works in combination with NamespaceSelector. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: + properties: + name: type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - scrapeInterval: - description: ScrapeInterval defines how often scrape targets by default - pattern: '[0-9]+(ms|s|m|h)' - type: string - scrapeTimeout: - description: ScrapeTimeout defines global timeout for targets scrape - pattern: '[0-9]+(ms|s|m|h)' - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: - type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - selectAllByDefault: - description: |- - SelectAllByDefault changes default behavior for empty CRD selectors, such ServiceScrapeSelector. - with selectAllByDefault: true and empty serviceScrapeSelector and ServiceScrapeNamespaceSelector - Operator selects all exist serviceScrapes - with selectAllByDefault: false - selects nothing - type: boolean - serviceAccountName: - description: ServiceAccountName is the name of the ServiceAccount - to use to run the pods - type: string - serviceScrapeNamespaceSelector: - description: |- - ServiceScrapeNamespaceSelector Namespaces to be selected for VMServiceScrape discovery. - Works in combination with Selector. - NamespaceSelector nil - only objects at VMAgent namespace. - Selector nil - only objects at NamespaceSelector namespaces. - If both nil - behaviour controlled by selectAllByDefault - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: + value: type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - serviceScrapeRelabelTemplate: - description: |- - ServiceScrapeRelabelTemplate defines relabel config, that will be added to each VMServiceScrape. - it's useful for adding specific labels to all targets - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling - properties: - action: - description: Action to perform based on regex matching. Default - is 'replace' - type: string - if: - description: 'If represents metricsQL match expression (or list - of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for `action: - graphite`' - type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source label - values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source label - values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string + type: object type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. + x-kubernetes-list-type: atomic + searches: items: type: string type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - serviceScrapeSelector: - description: |- - ServiceScrapeSelector defines ServiceScrapes to be selected for target discovery. - Works in combination with NamespaceSelector. - NamespaceSelector nil - only objects at VMAgent namespace. - Selector nil - only objects at NamespaceSelector namespaces. - If both nil - behaviour controlled by selectAllByDefault - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + enableKubernetesAPISelectors: + type: boolean + enforcedNamespaceLabel: + type: string + externalLabels: + additionalProperties: + type: string + type: object + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic type: object - type: object - x-kubernetes-map-type: atomic - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vmagent VMServiceScrape - spec - required: - - endpoints - type: object - x-kubernetes-preserve-unknown-fields: true - serviceSpec: - description: ServiceSpec that will be added to vmagent service spec - properties: - metadata: - description: EmbeddedObjectMetadata defines objectMeta for additional - service. + type: array + globalScrapeMetricRelabelConfigs: + items: properties: - annotations: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: additionalProperties: type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + globalScrapeRelabelConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true labels: additionalProperties: type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names + match: type: string - type: object - spec: - description: |- - ServiceSpec describes the attributes that a user creates on a service. - More info: https://kubernetes.io/docs/concepts/services-networking/service/ - type: object - x-kubernetes-preserve-unknown-fields: true - useAsDefault: - description: |- - UseAsDefault applies changes from given service definition to the main object Service - Changing from headless service to clusterIP or loadbalancer may break cross-component communication - type: boolean - required: - - spec - type: object - shardCount: - description: |- - ShardCount - numbers of shards of VMAgent - in this case operator will use 1 deployment/sts per shard with - replicas count according to spec.replicas, - see [here](https://docs.victoriametrics.com/victoriametrics/vmagent/#scraping-big-number-of-targets) - type: integer - startupProbe: - description: StartupProbe that will be added to CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - statefulMode: - description: |- - StatefulMode enables StatefulSet for `VMAgent` instead of Deployment - it allows using persistent storage for vmagent's persistentQueue - type: boolean - statefulRollingUpdateStrategy: - description: |- - StatefulRollingUpdateStrategy allows configuration for strategyType - set it to RollingUpdate for disabling operator statefulSet rollingUpdate - type: string - statefulStorage: - description: StatefulStorage configures storage for StatefulSet - properties: - disableMountSubPath: - description: |- - Deprecated: subPath usage will be disabled by default in a future release, this option will become unnecessary. - DisableMountSubPath allows to remove any subPath usage in volume mounts. - type: boolean - emptyDir: - description: |- - EmptyDirVolumeSource to be used by the Prometheus StatefulSets. If specified, used in place of any volumeClaimTemplate. More - info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir - properties: - medium: - description: |- - medium represents what type of storage medium should back this directory. - The default is "" which means to use the node's default medium. - Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: |- - sizeLimit is the total amount of local storage required for this EmptyDir volume. - The size limit is also applicable for memory medium. - The maximum usage on memory medium EmptyDir would be the minimum value between - the SizeLimit specified here and the sum of memory limits of all containers in a pod. - The default is nil which means that the limit is undefined. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - volumeClaimTemplate: - description: A PVC spec to be used by the StatefulSets/Deployments. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + separator: type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to - an EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + ignoreNamespaceSelectors: + type: boolean + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + ingestOnlyMode: + type: boolean + initContainers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + inlineRelabelConfig: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string type: object - spec: - description: |- - Spec defines the desired characteristics of a volume requested by a pod author. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + inlineScrapeConfig: + type: string + insertPorts: + properties: + graphitePort: + type: string + influxPort: + type: string + openTSDBHTTPPort: + type: string + openTSDBPort: + type: string + type: object + license: + properties: + forceOffline: + type: boolean + key: + type: string + keyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + reloadInterval: + type: string + type: object + livenessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + logFormat: + enum: + - default + - json + type: string + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + managedMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + maxScrapeInterval: + type: string + minReadySeconds: + format: int32 + type: integer + minScrapeInterval: + type: string + nodeScrapeNamespaceSelector: + properties: + matchExpressions: + items: properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + key: + type: string + operator: + type: string + values: items: type: string type: array x-kubernetes-list-type: atomic - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - type: string - required: - - kind - - name - type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - selector: - description: selector is a label query over volumes to - consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string or nil value indicates that no - VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, - this field can be reset to its previous value (including nil) to cancel the modification. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the - PersistentVolume backing this claim. - type: string + required: + - key + - operator type: object - status: - description: |- - Status represents the current information/status of a persistent volume claim. - Read-only. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + nodeScrapeRelabelTemplate: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + nodeScrapeSelector: + properties: + matchExpressions: + items: properties: - accessModes: - description: |- - accessModes contains the actual access modes the volume backing the PVC has. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + key: + type: string + operator: + type: string + values: items: type: string type: array x-kubernetes-list-type: atomic - allocatedResourceStatuses: - additionalProperties: - description: |- - When a controller receives persistentvolume claim update with ClaimResourceStatus for a resource - that it does not recognizes, then it should ignore that update and let other controllers - handle it. - type: string - description: "allocatedResourceStatuses stores status - of resource being resized for the given PVC.\nKey names - follow standard Kubernetes label syntax. Valid values - are either:\n\t* Un-prefixed keys:\n\t\t- storage - - the capacity of the volume.\n\t* Custom resources must - use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or have - kubernetes.io prefix are considered\nreserved and hence - may not be used.\n\nClaimResourceStatus can be in any - of following states:\n\t- ControllerResizeInProgress:\n\t\tState - set when resize controller starts resizing the volume - in control-plane.\n\t- ControllerResizeFailed:\n\t\tState - set when resize has failed in resize controller with - a terminal error.\n\t- NodeResizePending:\n\t\tState - set when resize controller has finished resizing the - volume but further resizing of\n\t\tvolume is needed - on the node.\n\t- NodeResizeInProgress:\n\t\tState set - when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState - set when resizing has failed in kubelet with a terminal - error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor - example: if expanding a PVC for more capacity - this - field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeFailed\"\nWhen this field is not set, - it means that no resize operation is in progress for - the given PVC.\n\nA controller that receives PVC update - with previously unknown resourceName or ClaimResourceStatus\nshould - ignore the update for the purpose it was designed. For - example - a controller that\nonly is responsible for - resizing capacity of the volume, should ignore PVC updates - that change other valid\nresources associated with PVC.\n\nThis - is an alpha field and requires enabling RecoverVolumeExpansionFailure - feature." - type: object - x-kubernetes-map-type: granular - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: "allocatedResources tracks the resources - allocated to a PVC including its capacity.\nKey names - follow standard Kubernetes label syntax. Valid values - are either:\n\t* Un-prefixed keys:\n\t\t- storage - - the capacity of the volume.\n\t* Custom resources must - use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or have - kubernetes.io prefix are considered\nreserved and hence - may not be used.\n\nCapacity reported here may be larger - than the actual capacity when a volume expansion operation\nis - requested.\nFor storage quota, the larger value from - allocatedResources and PVC.spec.resources is used.\nIf - allocatedResources is not set, PVC.spec.resources alone - is used for quota calculation.\nIf a volume expansion - capacity request is lowered, allocatedResources is only\nlowered - if there are no expansion operations in progress and - if the actual volume capacity\nis equal or lower than - the requested capacity.\n\nA controller that receives - PVC update with previously unknown resourceName\nshould - ignore the update for the purpose it was designed. For - example - a controller that\nonly is responsible for - resizing capacity of the volume, should ignore PVC updates - that change other valid\nresources associated with PVC.\n\nThis - is an alpha field and requires enabling RecoverVolumeExpansionFailure - feature." - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: capacity represents the actual resources - of the underlying volume. - type: object - conditions: - description: |- - conditions is the current Condition of persistent volume claim. If underlying persistent volume is being - resized then the Condition will be set to 'Resizing'. - items: - description: PersistentVolumeClaimCondition contains - details about state of pvc - properties: - lastProbeTime: - description: lastProbeTime is the time we probed - the condition. - format: date-time - type: string - lastTransitionTime: - description: lastTransitionTime is the time the - condition transitioned from one status to another. - format: date-time - type: string - message: - description: message is the human-readable message - indicating details about last transition. - type: string - reason: - description: |- - reason is a unique, this should be a short, machine understandable string that gives the reason - for condition's last transition. If it reports "Resizing" that means the underlying - persistent volume is being resized. - type: string - status: - description: |- - Status is the status of the condition. - Can be True, False, Unknown. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required - type: string - type: - description: |- - Type is the type of the condition. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about - type: string - required: - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - currentVolumeAttributesClassName: - description: |- - currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. - When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim - type: string - modifyVolumeStatus: - description: |- - ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. - When this is unset, there is no ModifyVolume operation being attempted. - properties: - status: - description: "status is the status of the ControllerModifyVolume - operation. It can be in any of following states:\n - - Pending\n Pending indicates that the PersistentVolumeClaim - cannot be modified due to unmet requirements, such - as\n the specified VolumeAttributesClass not existing.\n - - InProgress\n InProgress indicates that the volume - is being modified.\n - Infeasible\n Infeasible - indicates that the request has been rejected as - invalid by the CSI driver. To\n\t resolve the error, - a valid VolumeAttributesClass needs to be specified.\nNote: - New statuses can be added in the future. Consumers - should check for unknown statuses and fail appropriately." - type: string - targetVolumeAttributesClassName: - description: targetVolumeAttributesClassName is the - name of the VolumeAttributesClass the PVC currently - being reconciled - type: string - required: - - status - type: object - phase: - description: phase represents the current phase of PersistentVolumeClaim. - type: string + required: + - key + - operator type: object - type: object - type: object - staticScrapeNamespaceSelector: - description: |- - StaticScrapeNamespaceSelector defines Namespaces to be selected for VMStaticScrape discovery. - Works in combination with NamespaceSelector. - NamespaceSelector nil - only objects at VMAgent namespace. - Selector nil - only objects at NamespaceSelector namespaces. - If both nil - behaviour controlled by selectAllByDefault - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - staticScrapeRelabelTemplate: - description: |- - StaticScrapeRelabelTemplate defines relabel config, that will be added to each VMStaticScrape. - it's useful for adding specific labels to all targets - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling + type: object + x-kubernetes-map-type: atomic + nodeSelector: + additionalProperties: + type: string + type: object + overrideHonorLabels: + type: boolean + overrideHonorTimestamps: + type: boolean + paused: + type: boolean + persistentVolumeClaimRetentionPolicy: properties: - action: - description: Action to perform based on regex matching. Default - is 'replace' + whenDeleted: type: string - if: - description: 'If represents metricsQL match expression (or list - of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: + whenScaled: + type: string + type: object + podDisruptionBudget: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: additionalProperties: type: string - description: 'Labels is used together with Match for `action: - graphite`' type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source label - values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow type: string - separator: - description: Separator placed between concatenated source label - values. default is ';'. + type: object + podMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 + type: object + podScrapeNamespaceSelector: + properties: + matchExpressions: items: - type: string + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + podScrapeRelabelTemplate: + items: + properties: + action: type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + podScrapeSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - staticScrapeSelector: - description: |- - StaticScrapeSelector defines VMStaticScrape to be selected for target discovery. - Works in combination with NamespaceSelector. - If both nil - match everything. - NamespaceSelector nil - only objects at VMAgent namespace. - Selector nil - only objects at NamespaceSelector namespaces. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + port: + type: string + priorityClassName: + type: string + probeNamespaceSelector: + properties: + matchExpressions: + items: + properties: + key: type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - streamAggrConfig: - description: StreamAggrConfig defines global stream aggregation configuration - for VMAgent - properties: - configmap: - description: ConfigMap with stream aggregation rules + type: object + x-kubernetes-map-type: atomic + probeScrapeRelabelTemplate: + items: properties: - key: - description: The key to select. + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its key must - be defined - type: boolean - required: - - key type: object - x-kubernetes-map-type: atomic - dedupInterval: - description: Allows setting different de-duplication intervals - per each configured remote storage - type: string - dropInput: - description: Allow drop all the input samples after the aggregation - type: boolean - dropInputLabels: - description: labels to drop from samples for aggregator before - stream de-duplication and aggregation - items: - type: string - type: array - enableWindows: - description: EnableWindows enables aggregating data in separate - windows ( available from v0.54.0). - type: boolean - ignoreFirstIntervals: - description: IgnoreFirstIntervals instructs to ignore first interval - type: integer - ignoreFirstSampleInterval: - description: IgnoreFirstSampleInterval sets interval for total - and prometheus_total during which first samples will be ignored - type: string - ignoreOldSamples: - description: IgnoreOldSamples instructs to ignore samples with - old timestamps outside the current aggregation interval. - type: boolean - keepInput: - description: Allows writing both raw and aggregate data - type: boolean - rules: - description: Stream aggregation rules - items: - description: StreamAggrRule defines the rule in stream aggregation - config - properties: - by: - description: |- - By is an optional list of labels for grouping input series. - - See also Without. - - If neither By nor Without are set, then the Outputs are calculated - individually per each input time series. - items: + type: array + probeSelector: + properties: + matchExpressions: + items: + properties: + key: type: string - type: array - dedup_interval: - description: DedupInterval is an optional interval for deduplication. - type: string - drop_input_labels: - description: |- - DropInputLabels is an optional list with labels, which must be dropped before further processing of input samples. - - Labels are dropped before de-duplication and aggregation. - items: + operator: type: string - type: array - enable_windows: - description: EnableWindows enables aggregating data in separate - windows - type: boolean - flush_on_shutdown: - description: |- - FlushOnShutdown defines whether to flush the aggregation state on process termination - or config reload. Is `false` by default. - It is not recommended changing this setting, unless unfinished aggregations states - are preferred to missing data points. - type: boolean - ignore_first_intervals: - type: integer - ignore_old_samples: - description: IgnoreOldSamples instructs to ignore samples - with old timestamps outside the current aggregation interval. - type: boolean - ignoreFirstSampleInterval: - description: IgnoreFirstSampleInterval sets interval for - total and prometheus_total during which first samples - will be ignored - type: string - input_relabel_configs: - description: |- - InputRelabelConfigs is an optional relabeling rules, which are applied on the input - before aggregation. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling - properties: - action: - description: Action to perform based on regex matching. - Default is 'replace' - type: string - if: - description: 'If represents metricsQL match expression - (or list of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for - `action: graphite`' - type: object - match: - description: 'Match is used together with Labels for - `action: graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source - label values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + readinessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + relabelConfig: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + remoteWrite: + items: + properties: + aws: + properties: + ec2Endpoint: + type: string + region: + type: string + roleARN: + type: string + service: + type: string + stsEndpoint: + type: string + useSigv4: + type: boolean + type: object + basicAuth: + properties: + password: + properties: + key: type: string - separator: - description: Separator placed between concatenated - source label values. default is ';'. + name: + default: "" type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: - type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. + name: + default: "" type: string + optional: + type: boolean + required: + - key type: object - type: array - interval: - description: Interval is the interval between aggregations. + x-kubernetes-map-type: atomic + type: object + bearerTokenSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + forceVMProto: + type: boolean + headers: + items: type: string - keep_metric_names: - description: KeepMetricNames instructs to leave metric names - as is for the output time series without adding any suffix. - type: boolean - match: - description: |- - Match is a label selector (or list of label selectors) for filtering time series for the given selector. - - If the match isn't set, then all the input time series are processed. - x-kubernetes-preserve-unknown-fields: true - no_align_flush_to_interval: - description: |- - NoAlignFlushToInterval disables aligning of flushes to multiples of Interval. - By default flushes are aligned to Interval. - type: boolean - output_relabel_configs: - description: |- - OutputRelabelConfigs is an optional relabeling rules, which are applied - on the aggregated output before being sent to remote storage. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling - properties: - action: - description: Action to perform based on regex matching. - Default is 'replace' + type: array + inlineUrlRelabelConfig: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: type: string - if: - description: 'If represents metricsQL match expression - (or list of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for - `action: graphite`' - type: object - match: - description: 'Match is used together with Labels for - `action: graphite`' + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: type: string - modulus: - description: Modulus to take of the hash of the source - label values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' + type: array + sourceLabels: + items: type: string - separator: - description: Separator placed between concatenated - source label values. default is ';'. + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + maxDiskUsage: + x-kubernetes-preserve-unknown-fields: true + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: - type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 + name: + default: "" type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: + additionalProperties: + type: string + type: object + proxy_url: + type: string + scopes: + items: + type: string + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url + type: object + proxyURL: + type: string + sendTimeout: + pattern: '[0-9]+(ms|s|m|h)' + type: string + streamAggrConfig: + properties: + configmap: + properties: + key: + type: string + name: + default: "" type: string + optional: + type: boolean + required: + - key type: object - type: array - outputs: - description: |- - Outputs is a list of output aggregate functions to produce. - - The following names are allowed: - - - total - aggregates input counters - - increase - counts the increase over input counters - - count_series - counts the input series - - count_samples - counts the input samples - - sum_samples - sums the input samples - - last - the last biggest sample value - - min - the minimum sample value - - max - the maximum sample value - - avg - the average value across all the samples - - stddev - standard deviation across all the samples - - stdvar - standard variance across all the samples - - histogram_bucket - creates VictoriaMetrics histogram for input samples - - quantiles(phi1, ..., phiN) - quantiles' estimation for phi in the range [0..1] - - The output time series will have the following names: - - input_name:aggr__ - items: + x-kubernetes-map-type: atomic + dedupInterval: type: string - type: array - staleness_interval: - description: |- - Staleness interval is interval after which the series state will be reset if no samples have been sent during it. - The parameter is only relevant for outputs: total, total_prometheus, increase, increase_prometheus and histogram_bucket. - type: string - without: - description: |- - Without is an optional list of labels, which must be excluded when grouping input series. - - See also By. - - If neither By nor Without are set, then the Outputs are calculated - individually per each input time series. - items: + dropInput: + type: boolean + dropInputLabels: + items: + type: string + type: array + enableWindows: + type: boolean + ignoreFirstIntervals: + type: integer + ignoreFirstSampleInterval: type: string - type: array - required: - - interval - - outputs - type: object - type: array - type: object - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container graceful - termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread matching - pods among the given topology. - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - updateStrategy: - description: |- - UpdateStrategy - overrides default update strategy. - works only for deployments, statefulset always use OnDelete. - enum: - - Recreate - - RollingUpdate - type: string - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - useVMConfigReloader: - description: |- - UseVMConfigReloader replaces prometheus-like config-reloader - with vm one. It uses secrets watch instead of file watch - which greatly increases speed of config updates - type: boolean - vmAgentExternalLabelName: - description: |- - VMAgentExternalLabelName Name of vmAgent external label used to denote vmAgent instance - name. Defaults to the value of `prometheus`. External label will - _not_ be added when value is set to empty string (`""`). - type: string - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that may - be accessed by any container in the pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - required: - - remoteWrite - type: object - status: - description: VMAgentStatus defines the observed state of VMAgent - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 - type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - replicas: - description: ReplicaCount Total number of pods targeted by this VMAgent - format: int32 - type: integer - selector: - description: Selector string form of label value set for autoscaling - type: string - shards: - description: Shards represents total number of vmagent deployments - with uniq scrape targets - format: int32 - type: integer - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - type: object - served: true - storage: true - subresources: - scale: - labelSelectorPath: .status.selector - specReplicasPath: .spec.shardCount - statusReplicasPath: .status.shards - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.18.0 - name: vmalertmanagerconfigs.operator.victoriametrics.com -spec: - group: operator.victoriametrics.com - names: - kind: VMAlertmanagerConfig - listKind: VMAlertmanagerConfigList - plural: vmalertmanagerconfigs - singular: vmalertmanagerconfig - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.updateStatus - name: Status - type: string - - jsonPath: .status.reason - name: Sync Error - type: string - name: v1beta1 - schema: - openAPIV3Schema: - description: VMAlertmanagerConfig is the Schema for the vmalertmanagerconfigs - API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: |- - VMAlertmanagerConfigSpec defines configuration for VMAlertmanagerConfig - it must reference only locally defined objects - properties: - inhibit_rules: - description: |- - InhibitRules will only apply for alerts matching - the resource's namespace. - items: - description: |- - InhibitRule defines an inhibition rule that allows to mute alerts when other - alerts are already firing. - Note, it doesn't support deprecated alertmanager config options. - See https://prometheus.io/docs/alerting/latest/configuration/#inhibit_rule - properties: - equal: - description: |- - Labels that must have an equal value in the source and target alert for - the inhibition to take effect. - items: - type: string - type: array - source_matchers: - description: |- - SourceMatchers defines a list of matchers for which one or more alerts have - to exist for the inhibition to take effect. - items: - type: string - type: array - target_matchers: - description: |- - TargetMatchers defines a list of matchers that have to be fulfilled by the target - alerts to be muted. - items: - type: string - type: array - type: object - type: array - receivers: - description: Receivers defines alert receivers - items: - description: Receiver defines one or more notification integrations. - properties: - discord_configs: - items: - properties: - avatar_url: - description: |- - AvatarURL defines message avatar URL - Available from operator v0.55.0 and alertmanager v0.28.0 - type: string - content: - description: |- - Content defines message content template - Available from operator v0.55.0 and alertmanager v0.28.0 - maxLength: 2000 - type: string - http_config: - description: HTTP client configuration. - properties: - authorization: - description: |- - Authorization header configuration for the client. - This is mutually exclusive with BasicAuth and is only available starting from Alertmanager v0.22+. - properties: - credentials: - description: Reference to the secret with value - for authorization - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization + ignoreOldSamples: + type: boolean + keepInput: + type: boolean + rules: + items: + properties: + by: + items: type: string - type: - description: Type of authorization, default to - bearer + type: array + dedup_interval: + type: string + drop_input_labels: + items: type: string - type: object - basic_auth: - description: BasicAuth for the client. - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object + type: array + enable_windows: + type: boolean + flush_on_shutdown: + type: boolean + ignore_first_intervals: + type: integer + ignore_old_samples: + type: boolean + ignoreFirstSampleInterval: + type: string + input_relabel_configs: + items: properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. + action: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object + type: array + interval: + type: string + keep_metric_names: + type: boolean + match: + x-kubernetes-preserve-unknown-fields: true + no_align_flush_to_interval: + type: boolean + output_relabel_configs: + items: properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. + action: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key type: object - x-kubernetes-map-type: atomic + type: array + outputs: + items: + type: string + type: array + staleness_interval: + type: string + without: + items: + type: string + type: array + required: + - interval + - outputs + type: object + type: array + type: object + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key type: object - bearer_token_file: - description: BearerTokenFile defines filename for - bearer token, it must be mounted to pod. - type: string - bearer_token_secret: - description: |- - The secret's key that contains the bearer token - It must be at them same namespace as CRD + x-kubernetes-map-type: atomic + secret: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its - key must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - oauth2: - description: OAuth2 client credentials used to fetch - a token for the targets. + type: object + caFile: + type: string + cert: + properties: + configMap: properties: - client_id: - description: The secret or configmap containing - the OAuth2 client id - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - client_secret: - description: The secret containing the OAuth2 - client secret - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - client_secret_file: - description: ClientSecretFile defines path for - client secret file. + key: type: string - endpoint_params: - additionalProperties: - type: string - description: Parameters to append to the token - URL - type: object - proxy_url: - description: |- - The proxy URL for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family + name: + default: "" type: string - scopes: - description: OAuth2 scopes used for the token - request - items: - type: string - type: array - tls_config: - description: |- - TLSConfig for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - x-kubernetes-preserve-unknown-fields: true - token_url: - description: The URL to fetch the token from - minLength: 1 + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" type: string + optional: + type: boolean required: - - client_id - - token_url + - key type: object - proxyURL: - description: Optional proxy URL. + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: type: string - tls_config: - description: TLS configuration for the client. - properties: - ca: - description: Struct containing the CA cert to - use for the targets. - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container - to use for the targets. - type: string - cert: - description: Struct containing the client cert - file for the targets. - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the - container for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the - container for the targets. - type: string - keySecret: - description: Secret containing the client key - file for the targets. - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the - targets. - type: string - type: object + name: + default: "" + type: string + optional: + type: boolean + required: + - key type: object - message: - description: The message body template + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + url: + type: string + urlRelabelConfig: + properties: + key: + type: string + name: + default: "" type: string - send_resolved: - description: SendResolved controls notify about resolved - alerts. + optional: type: boolean - title: - description: The message title template + required: + - key + type: object + x-kubernetes-map-type: atomic + required: + - url + type: object + type: array + remoteWriteSettings: + properties: + flushInterval: + pattern: '[0-9]+(ms|s|m|h)' + type: string + label: + additionalProperties: + type: string + type: object + maxBlockSize: + format: int32 + type: integer + maxDiskUsagePerURL: + x-kubernetes-preserve-unknown-fields: true + queues: + format: int32 + type: integer + showURL: + type: boolean + tmpDataPath: + type: string + useMultiTenantMode: + type: boolean + type: object + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: type: string - username: - description: |- - Username defines message username - Available from operator v0.55.0 and alertmanager v0.28.0 - type: string - webhook_url: - description: |- - The discord webhook URL - one of `urlSecret` and `url` must be defined. - type: string - webhook_url_secret: - description: |- - URLSecret defines secret name and key at the CRD namespace. - It must contain the webhook URL. - one of `urlSecret` and `url` must be defined. + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdate: + properties: + maxSurge: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + runtimeClassName: + type: string + schedulerName: + type: string + scrapeClasses: + items: + properties: + attachMetadata: + properties: + namespace: + type: boolean + node: + type: boolean + type: object + authorization: + properties: + credentials: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key - must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic + credentialsFile: + type: string + type: + type: string type: object - type: array - email_configs: - description: EmailConfigs defines email notification configurations. - items: - description: EmailConfig configures notifications via Email. + basicAuth: properties: - auth_identity: - description: The identity to use for authentication. - type: string - auth_password: - description: AuthPassword defines secret name and key - at CRD namespace. + password: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key - must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - auth_secret: - description: |- - AuthSecret defines secret name and key at CRD namespace. - It must contain the CRAM-MD5 secret. + password_file: + type: string + username: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key - must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - auth_username: - description: The username to use for authentication. - type: string - from: - description: |- - The sender address. - fallback to global setting if empty - type: string - headers: - additionalProperties: - type: string - description: |- - Further headers email header key/value pairs. Overrides any headers - previously set by the notification implementation. - type: object - hello: - description: The hostname to identify to the SMTP server. + type: object + bearerTokenFile: + type: string + bearerTokenSecret: + nullable: true + properties: + key: type: string - html: - description: The HTML body of the email notification. + name: + default: "" type: string - require_tls: - description: |- - The SMTP TLS requirement. - Note that Go does not support unencrypted connections to remote SMTP endpoints. - type: boolean - send_resolved: - description: SendResolved controls notify about resolved - alerts. + optional: type: boolean - smarthost: - description: |- - The SMTP host through which emails are sent. - fallback to global setting if empty - type: string - text: - description: The text body of the email notification. - type: string - tls_config: - description: TLS configuration + required: + - key + type: object + x-kubernetes-map-type: atomic + default: + type: boolean + metricRelabelConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + name: + minLength: 1 + type: string + oauth2: + properties: + client_id: properties: - ca: - description: Struct containing the CA cert to use - for the targets. + configMap: properties: - configMap: - description: ConfigMap containing data to use - for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for - the targets. - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container - to use for the targets. - type: string - cert: - description: Struct containing the client cert file - for the targets. - properties: - configMap: - description: ConfigMap containing data to use - for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for - the targets. - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key type: object - certFile: - description: Path to the client cert file in the container - for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container - for the targets. - type: string - keySecret: - description: Secret containing the client key file - for the targets. + x-kubernetes-map-type: atomic + secret: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its - key must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string type: object - to: - description: The email address to send notifications to. - type: string - type: object - type: array - incidentio_configs: - items: - description: |- - IncidentIOConfig configures notifications via incident.io. - https://prometheus.io/docs/alerting/latest/configuration/#incidentio_config - available from v0.66.0 operator version - and v0.29.0 alertmanager version - properties: - alert_source_token: - description: AlertSourceToken is used to authenticate - with incident.io + client_secret: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key - must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - http_config: - x-kubernetes-preserve-unknown-fields: true - max_alerts: - description: MaxAlerts defines maximum number of alerts - to be sent per incident.io message. - type: integer - send_resolved: - description: SendResolved controls notify about resolved - alerts. - type: boolean - timeout: - description: Timeout is the maximum time allowed to invoke - incident.io - type: string - url: - description: |- - The URL to send the incident.io alert. This would typically be provided by the - incident.io team when setting up an alert source. - type: string - type: object - type: array - jira_configs: - items: - description: |- - JiraConfig represent alertmanager's jira_config entry - https://prometheus.io/docs/alerting/latest/configuration/#jira_config - available from v0.55.0 operator version - and v0.28.0 alertmanager version - properties: - api_url: - description: |- - The URL to send API requests to. The full API path must be included. - Example: https://company.atlassian.net/rest/api/2/ + client_secret_file: type: string - custom_fields: + endpoint_params: additionalProperties: - x-kubernetes-preserve-unknown-fields: true - description: |- - Other issue and custom fields. - Jira issue field can have multiple types. - Depends on the field type, the values must be provided differently. - See https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/#setting-custom-field-data-for-other-field-types for further examples. + type: string type: object - description: - description: Issue description template. - type: string - http_config: - description: |- - The HTTP client's configuration. You must use this configuration to supply the personal access token (PAT) as part of the HTTP `Authorization` header. - For Jira Cloud, use basic_auth with the email address as the username and the PAT as the password. - For Jira Data Center, use the 'authorization' field with 'credentials: '. - x-kubernetes-preserve-unknown-fields: true - issue_type: - description: Type of the issue (e.g. Bug) + proxy_url: type: string - labels: - description: Labels to be added to the issue + scopes: items: type: string type: array - priority: - description: Priority of the issue - type: string - project: - description: The project key where issues are created - type: string - reopen_duration: - description: |- - If reopen_transition is defined, reopen the issue when it is not older than this value (rounded down to the nearest minute). - The resolutiondate field is used to determine the age of the issue. - pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ - type: string - reopen_transition: - description: |- - Name of the workflow transition to resolve an issue. - The target status must have the category "done". - type: string - resolve_transition: - description: |- - Name of the workflow transition to reopen an issue. - The target status should not have the category "done". - type: string - send_resolved: - description: SendResolved controls notify about resolved - alerts. - type: boolean - summary: - description: Issue summary template - type: string - wont_fix_resolution: - description: If reopen_transition is defined, ignore issues - with that resolution. + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 type: string required: - - issue_type - - project + - client_id + - token_url type: object - type: array - msteams_configs: - items: + relabelConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + tlsConfig: properties: - http_config: - description: HTTP client configuration. + ca: properties: - authorization: - description: |- - Authorization header configuration for the client. - This is mutually exclusive with BasicAuth and is only available starting from Alertmanager v0.22+. + configMap: properties: - credentials: - description: Reference to the secret with value - for authorization - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization + key: type: string - type: - description: Type of authorization, default to - bearer + name: + default: "" type: string + optional: + type: boolean + required: + - key type: object - basic_auth: - description: BasicAuth for the client. + x-kubernetes-map-type: atomic + secret: properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted + key: type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic + name: + default: "" + type: string + optional: + type: boolean + required: + - key type: object - bearer_token_file: - description: BearerTokenFile defines filename for - bearer token, it must be mounted to pod. - type: string - bearer_token_secret: - description: |- - The secret's key that contains the bearer token - It must be at them same namespace as CRD + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its - key must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - oauth2: - description: OAuth2 client credentials used to fetch - a token for the targets. + secret: properties: - client_id: - description: The secret or configmap containing - the OAuth2 client id - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - client_secret: - description: The secret containing the OAuth2 - client secret - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - client_secret_file: - description: ClientSecretFile defines path for - client secret file. + key: type: string - endpoint_params: - additionalProperties: - type: string - description: Parameters to append to the token - URL - type: object - proxy_url: - description: |- - The proxy URL for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family + name: + default: "" type: string - scopes: - description: OAuth2 scopes used for the token - request - items: - type: string - type: array - tls_config: - description: |- - TLSConfig for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - x-kubernetes-preserve-unknown-fields: true - token_url: - description: The URL to fetch the token from - minLength: 1 - type: string - required: - - client_id - - token_url - type: object - proxyURL: - description: Optional proxy URL. - type: string - tls_config: - description: TLS configuration for the client. - properties: - ca: - description: Struct containing the CA cert to - use for the targets. - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container - to use for the targets. - type: string - cert: - description: Struct containing the client cert - file for the targets. - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the - container for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. + optional: type: boolean - keyFile: - description: Path to the client key file in the - container for the targets. - type: string - keySecret: - description: Secret containing the client key - file for the targets. - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the - targets. - type: string + required: + - key type: object + x-kubernetes-map-type: atomic type: object - send_resolved: - description: SendResolved controls notify about resolved - alerts. + certFile: + type: string + insecureSkipVerify: type: boolean - text: - description: The text body of the teams notification. - type: string - title: - description: The title of the teams notification. - type: string - webhook_url: - description: |- - The incoming webhook URL - one of `urlSecret` and `url` must be defined. - type: string - webhook_url_secret: - description: |- - URLSecret defines secret name and key at the CRD namespace. - It must contain the webhook URL. - one of `urlSecret` and `url` must be defined. + keyFile: + type: string + keySecret: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key - must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic + serverName: + type: string type: object - type: array - msteamsv2_configs: + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + scrapeConfigNamespaceSelector: + properties: + matchExpressions: items: - description: |- - MSTeamsV2Config sends notifications using the new message format with adaptive cards as required by flows. - https://support.microsoft.com/en-gb/office/create-incoming-webhooks-with-workflows-for-microsoft-teams-8ae491c7-0394-4861-ba59-055e33f75498 - available from v0.55.0 operator version - and v0.28.0 alertmanager version properties: - http_config: - x-kubernetes-preserve-unknown-fields: true - send_resolved: - description: SendResolved controls notify about resolved - alerts. - type: boolean - text: - description: Message body template. - type: string - title: - description: Message title template. - type: string - webhook_url: - description: |- - The incoming webhook URL - one of `urlSecret` and `url` must be defined. - type: string - webhook_url_secret: - description: |- - URLSecret defines secret name and key at the CRD namespace. - It must contain the webhook URL. - one of `webhook_url` or `webhook_url_secret` must be defined. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator type: object type: array - name: - description: Name of the receiver. Must be unique across all - items from the list. - minLength: 1 - type: string - opsgenie_configs: - description: OpsGenieConfigs defines ops genie notification - configurations. + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + scrapeConfigRelabelTemplate: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + scrapeConfigSelector: + properties: + matchExpressions: items: - description: |- - OpsGenieConfig configures notifications via OpsGenie. - See https://prometheus.io/docs/alerting/latest/configuration/#opsgenie_config properties: - actions: - description: Comma separated list of actions that will - be available for the alert. - type: string - api_key: - description: |- - The secret's key that contains the OpsGenie API key. - It must be at them same namespace as CRD - fallback to global setting if empty - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - apiURL: - description: The URL to send OpsGenie API requests to. - type: string - description: - description: Description of the incident. - type: string - details: - additionalProperties: - type: string - description: A set of arbitrary key/value pairs that provide - further detail about the incident. - type: object - entity: - description: Optional field that can be used to specify - which domain alert is related to. - type: string - http_config: - description: HTTP client configuration. - type: object - x-kubernetes-preserve-unknown-fields: true - message: - description: Alert text limited to 130 characters. - type: string - note: - description: Additional alert note. + key: type: string - priority: - description: Priority level of alert. Possible values - are P1, P2, P3, P4, and P5. + operator: type: string - responders: - description: List of responders responsible for notifications. + values: items: - description: |- - OpsGenieConfigResponder defines a responder to an incident. - One of `id`, `name` or `username` has to be defined. - properties: - id: - description: ID of the responder. - type: string - name: - description: Name of the responder. - type: string - type: - description: Type of responder. - minLength: 1 - type: string - username: - description: Username of the responder. - type: string - required: - - type - type: object + type: string type: array - send_resolved: - description: SendResolved controls notify about resolved - alerts. - type: boolean - source: - description: Backlink to the sender of the notification. - type: string - tags: - description: Comma separated list of tags attached to - the notifications. - type: string - update_alerts: - description: |- - Whether to update message and description of the alert in OpsGenie if it already exists - By default, the alert is never updated in OpsGenie, the new message only appears in activity log. - type: boolean + x-kubernetes-list-type: atomic + required: + - key + - operator type: object type: array - pagerduty_configs: - description: PagerDutyConfigs defines pager duty notification - configurations. + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + scrapeInterval: + pattern: '[0-9]+(ms|s|m|h)' + type: string + scrapeTimeout: + pattern: '[0-9]+(ms|s|m|h)' + type: string + secrets: + items: + type: string + type: array + securityContext: + type: object + x-kubernetes-preserve-unknown-fields: true + selectAllByDefault: + type: boolean + serviceAccountName: + type: string + serviceScrapeNamespaceSelector: + properties: + matchExpressions: items: - description: |- - PagerDutyConfig configures notifications via PagerDuty. - See https://prometheus.io/docs/alerting/latest/configuration/#pagerduty_config properties: - class: - description: The class/type of the event. - type: string - client: - description: Client identification. - type: string - client_url: - description: Backlink to the sender of notification. - type: string - component: - description: The part or component of the affected system - that is broken. - type: string - description: - description: Description of the incident. + key: type: string - details: - additionalProperties: - type: string - description: Arbitrary key/value pairs that provide further - detail about the incident. - type: object - group: - description: A cluster or grouping of sources. + operator: type: string - http_config: - description: HTTP client configuration. - type: object - x-kubernetes-preserve-unknown-fields: true - images: - description: Images to attach to the incident. - items: - description: |- - ImageConfig is used to attach images to the incident. - See https://developer.pagerduty.com/docs/ZG9jOjExMDI5NTgx-send-an-alert-event#the-images-property - for more information. - properties: - alt: - type: string - href: - type: string - source: - type: string - required: - - source - type: object - type: array - links: - description: Links to attach to the incident. + values: items: - description: |- - LinkConfig is used to attach text links to the incident. - See https://developer.pagerduty.com/docs/ZG9jOjExMDI5NTgx-send-an-alert-event#the-links-property - for more information. - properties: - href: - type: string - text: - type: string - required: - - href - type: object + type: string type: array - routing_key: - description: |- - The secret's key that contains the PagerDuty integration key (when using - Events API v2). Either this field or `serviceKey` needs to be defined. - It must be at them same namespace as CRD - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - send_resolved: - description: SendResolved controls notify about resolved - alerts. - type: boolean - service_key: - description: |- - The secret's key that contains the PagerDuty service key (when using - integration type "Prometheus"). Either this field or `routingKey` needs to - be defined. - It must be at them same namespace as CRD - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - severity: - description: Severity of the incident. - type: string - url: - description: The URL to send requests to. - type: string + x-kubernetes-list-type: atomic + required: + - key + - operator type: object type: array - pushover_configs: - description: PushoverConfigs defines push over notification - configurations. - items: - description: |- - PushoverConfig configures notifications via Pushover. - See https://prometheus.io/docs/alerting/latest/configuration/#pushover_config - properties: - expire: - description: |- - How long your notification will continue to be retried for, unless the user - acknowledges the notification. - type: string - html: - description: Whether notification message is HTML or plain - text. - type: boolean - http_config: - description: HTTP client configuration. - type: object - x-kubernetes-preserve-unknown-fields: true - message: - description: Notification message. - type: string - priority: - description: Priority, see https://pushover.net/api#priority - type: string - retry: - description: |- - How often the Pushover servers will send the same notification to the user. - Must be at least 30 seconds. - type: string - send_resolved: - description: SendResolved controls notify about resolved - alerts. - type: boolean - sound: - description: The name of one of the sounds supported by - device clients to override the user's default sound - choice - type: string - title: - description: Notification title. - type: string - token: - description: |- - The secret's key that contains the registered application’s API token, see https://pushover.net/apps. - It must be at them same namespace as CRD - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - url: - description: A supplementary URL shown alongside the message. - type: string - url_title: - description: A title for supplementary URL, otherwise - just the URL is shown - type: string - user_key: - description: |- - The secret's key that contains the recipient user’s user key. - It must be at them same namespace as CRD - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + serviceScrapeRelabelTemplate: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string type: object - type: array - rocketchat_configs: + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + serviceScrapeSelector: + properties: + matchExpressions: items: - description: |- - RocketchatConfig configures notifications via Rocketchat. - https://prometheus.io/docs/alerting/latest/configuration/#rocketchat_config - available from v0.55.0 operator version - and v0.28.0 alertmanager version properties: - actions: - items: - description: |- - RocketchatAttachmentAction defines message attachments - https://github.com/RocketChat/Rocket.Chat.Go.SDK/blob/master/models/message.go - properties: - msg: - type: string - text: - type: string - type: - type: string - url: - type: string - type: object - type: array - api_url: - type: string - channel: - description: 'RocketChat channel override, (like #other-channel - or @username).' - type: string - color: + key: type: string - emoji: + operator: type: string - fields: + values: items: - description: |- - RocketchatAttachmentField defines API fields - https://developer.rocket.chat/reference/api/rest-api/endpoints/messaging/chat-endpoints/postmessage#attachment-field-objects - properties: - short: - type: boolean - title: - type: string - value: - type: string - type: object + type: string type: array - http_config: - x-kubernetes-preserve-unknown-fields: true - icon_url: - type: string - image_url: - type: string - link_names: - type: boolean - send_resolved: - description: SendResolved controls notify about resolved - alerts. - type: boolean - short_fields: - type: boolean - text: - type: string - thumb_url: - type: string - title: + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + serviceScrapeSpec: + required: + - endpoints + type: object + x-kubernetes-preserve-unknown-fields: true + serviceSpec: + properties: + metadata: + properties: + annotations: + additionalProperties: type: string - title_link: + type: object + labels: + additionalProperties: type: string - token: - description: SecretKeySelector selects a key of a Secret. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: object + name: + type: string + type: object + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + useAsDefault: + type: boolean + required: + - spec + type: object + shardCount: + type: integer + startupProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + statefulMode: + type: boolean + statefulRollingUpdateStrategy: + type: string + statefulStorage: + properties: + disableMountSubPath: + type: boolean + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + volumeClaimTemplate: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + properties: + annotations: + additionalProperties: type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - token_id: - description: |- - The sender token and token_id - See https://docs.rocket.chat/use-rocket.chat/user-guides/user-panel/my-account#personal-access-tokens - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + type: object + labels: + additionalProperties: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: object + name: + type: string + type: object + spec: + properties: + accessModes: + items: type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - type: array - slack_configs: - description: SlackConfigs defines slack notification configurations. - items: - description: |- - SlackConfig configures notifications via Slack. - See https://prometheus.io/docs/alerting/latest/configuration/#slack_config - properties: - actions: - description: A list of Slack actions that are sent with - each notification. - items: - description: |- - SlackAction configures a single Slack action that is sent with each - notification. - See https://api.slack.com/docs/message-attachments#action_fields and - https://api.slack.com/docs/message-buttons for more information. + type: array + x-kubernetes-list-type: atomic + dataSource: properties: - confirm: - description: |- - SlackConfirmationField protect users from destructive actions or - particularly distinguished decisions by asking them to confirm their button - click one more time. - See https://api.slack.com/docs/interactive-message-field-guide#confirmation_fields - for more information. - properties: - dismiss_text: - type: string - ok_text: - type: string - text: - minLength: 1 - type: string - title: - type: string - required: - - text - type: object - name: - type: string - style: + apiGroup: type: string - text: - minLength: 1 - type: string - type: - minLength: 1 - type: string - url: + kind: type: string - value: + name: type: string required: - - text - - type + - kind + - name type: object - type: array - api_url: - description: |- - The secret's key that contains the Slack webhook URL. - It must be at them same namespace as CRD - fallback to global setting if empty - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - callback_id: - type: string - channel: - description: The channel or user to send notifications - to. - type: string - color: - type: string - fallback: - type: string - fields: - description: A list of Slack fields that are sent with - each notification. - items: - description: |- - SlackField configures a single Slack field that is sent with each notification. - See https://api.slack.com/docs/message-attachments#fields for more information. + x-kubernetes-map-type: atomic + dataSourceRef: properties: - short: - type: boolean - title: - minLength: 1 + apiGroup: + type: string + kind: + type: string + name: type: string - value: - minLength: 1 + namespace: type: string required: - - title - - value + - kind + - name type: object - type: array - footer: - type: string - http_config: - description: HTTP client configuration. - type: object - x-kubernetes-preserve-unknown-fields: true - icon_emoji: - type: string - icon_url: - type: string - image_url: - type: string - link_names: - type: boolean - mrkdwn_in: - items: - type: string - type: array - pretext: - type: string - send_resolved: - description: SendResolved controls notify about resolved - alerts. - type: boolean - short_fields: - type: boolean - text: - type: string - thumb_url: - type: string - title: - type: string - title_link: - type: string - username: - type: string - type: object - type: array - sns_configs: - items: - properties: - api_url: - description: The api URL - type: string - attributes: - additionalProperties: - type: string - description: SNS message attributes - type: object - http_config: - description: HTTP client configuration. - properties: - authorization: - description: |- - Authorization header configuration for the client. - This is mutually exclusive with BasicAuth and is only available starting from Alertmanager v0.22+. - properties: - credentials: - description: Reference to the secret with value - for authorization - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization - type: string - type: - description: Type of authorization, default to - bearer - type: string - type: object - basic_auth: - description: BasicAuth for the client. - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: properties: key: - description: The key of the secret to select - from. Must be a valid secret key. type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + operator: type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic required: - - key + - key + - operator type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearer_token_file: - description: BearerTokenFile defines filename for - bearer token, it must be mounted to pod. + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + status: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + allocatedResourceStatuses: + additionalProperties: type: string - bearer_token_secret: - description: |- - The secret's key that contains the bearer token - It must be at them same namespace as CRD + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + conditions: + items: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + lastProbeTime: + format: date-time type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + lastTransitionTime: + format: date-time type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - oauth2: - description: OAuth2 client credentials used to fetch - a token for the targets. - properties: - client_id: - description: The secret or configmap containing - the OAuth2 client id - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - client_secret: - description: The secret containing the OAuth2 - client secret - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - client_secret_file: - description: ClientSecretFile defines path for - client secret file. + message: type: string - endpoint_params: - additionalProperties: - type: string - description: Parameters to append to the token - URL - type: object - proxy_url: - description: |- - The proxy URL for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family + reason: type: string - scopes: - description: OAuth2 scopes used for the token - request - items: - type: string - type: array - tls_config: - description: |- - TLSConfig for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - x-kubernetes-preserve-unknown-fields: true - token_url: - description: The URL to fetch the token from - minLength: 1 + status: + type: string + type: type: string required: - - client_id - - token_url + - status + - type type: object - proxyURL: - description: Optional proxy URL. - type: string - tls_config: - description: TLS configuration for the client. - properties: - ca: - description: Struct containing the CA cert to - use for the targets. - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container - to use for the targets. - type: string - cert: - description: Struct containing the client cert - file for the targets. - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the - container for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the - container for the targets. - type: string - keySecret: - description: Secret containing the client key - file for the targets. - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the - targets. - type: string - type: object - type: object - message: - description: The message content of the SNS notification. - type: string - phone_number: - description: |- - Phone number if message is delivered via SMS - Specify this, topic_arn or target_arn - type: string - send_resolved: - description: SendResolved controls notify about resolved - alerts. - type: boolean - sigv4: - description: Configure the AWS Signature Verification - 4 signing process - properties: - access_key: - description: |- - The AWS API keys. Both access_key and secret_key must be supplied or both must be blank. - If blank the environment variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` are used. - type: string - access_key_selector: - description: secret key selector to get the keys from - a Kubernetes Secret - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - profile: - description: Named AWS profile used to authenticate - type: string - region: - description: AWS region, if blank the region from - the default credentials chain is used - type: string - role_arn: - description: AWS Role ARN, an alternative to using - AWS API keys - type: string - secret_key_selector: - description: secret key selector to get the keys from - a Kubernetes Secret - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - subject: - description: The subject line if message is delivered - to an email endpoint. - type: string - target_arn: - description: |- - Mobile platform endpoint ARN if message is delivered via mobile notifications - Specify this, topic_arn or phone_number + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentVolumeAttributesClassName: + type: string + modifyVolumeStatus: + properties: + status: + type: string + targetVolumeAttributesClassName: + type: string + required: + - status + type: object + phase: + type: string + type: object + type: object + type: object + staticScrapeNamespaceSelector: + properties: + matchExpressions: + items: + properties: + key: type: string - topic_arn: - description: SNS topic ARN, either specify this, phone_number - or target_arn + operator: type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator type: object type: array - telegram_configs: + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + staticScrapeRelabelTemplate: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + staticScrapeSelector: + properties: + matchExpressions: items: - description: |- - TelegramConfig configures notification via telegram - https://prometheus.io/docs/alerting/latest/configuration/#telegram_config properties: - api_url: - description: APIUrl the Telegram API URL i.e. https://api.telegram.org. + key: type: string - bot_token: - description: |- - BotToken token for the bot - https://core.telegram.org/bots/api - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - chat_id: - description: ChatID is ID of the chat where to send the - messages. - type: integer - disable_notifications: - description: DisableNotifications - type: boolean - http_config: - description: HTTP client configuration. - type: object - x-kubernetes-preserve-unknown-fields: true - message: - description: Message is templated message + operator: type: string - message_thread_id: - description: MessageThreadID defines ID of the message - thread where to send the messages. - type: integer - parse_mode: - description: |- - ParseMode for telegram message, - supported values are MarkdownV2, Markdown, Markdown and empty string for plain text. - type: string - send_resolved: - description: SendResolved controls notify about resolved - alerts. - type: boolean + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic required: - - bot_token - - chat_id + - key + - operator type: object type: array - victorops_configs: - description: VictorOpsConfigs defines victor ops notification - configurations. + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + streamAggrConfig: + properties: + configmap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + dedupInterval: + type: string + dropInput: + type: boolean + dropInputLabels: + items: + type: string + type: array + enableWindows: + type: boolean + ignoreFirstIntervals: + type: integer + ignoreFirstSampleInterval: + type: string + ignoreOldSamples: + type: boolean + keepInput: + type: boolean + rules: items: - description: |- - VictorOpsConfig configures notifications via VictorOps. - See https://prometheus.io/docs/alerting/latest/configuration/#victorops_config properties: - api_key: - description: |- - The secret's key that contains the API key to use when talking to the VictorOps API. - It must be at them same namespace as CRD - fallback to global setting if empty - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - api_url: - description: The VictorOps API URL. + by: + items: + type: string + type: array + dedup_interval: type: string - custom_fields: - additionalProperties: + drop_input_labels: + items: type: string - description: |- - Adds optional custom fields - https://github.com/prometheus/alertmanager/blob/v0.24.0/config/notifiers.go#L537 - type: object - entity_display_name: - description: Contains summary of the alerted problem. + type: array + enable_windows: + type: boolean + flush_on_shutdown: + type: boolean + ignore_first_intervals: + type: integer + ignore_old_samples: + type: boolean + ignoreFirstSampleInterval: type: string - http_config: - description: The HTTP client's configuration. - properties: - authorization: - description: |- - Authorization header configuration for the client. - This is mutually exclusive with BasicAuth and is only available starting from Alertmanager v0.22+. - properties: - credentials: - description: Reference to the secret with value - for authorization - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization - type: string - type: - description: Type of authorization, default to - bearer - type: string - type: object - basic_auth: - description: BasicAuth for the client. - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted + input_relabel_configs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearer_token_file: - description: BearerTokenFile defines filename for - bearer token, it must be mounted to pod. - type: string - bearer_token_secret: - description: |- - The secret's key that contains the bearer token - It must be at them same namespace as CRD - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: array + sourceLabels: + items: type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - oauth2: - description: OAuth2 client credentials used to fetch - a token for the targets. - properties: - client_id: - description: The secret or configmap containing - the OAuth2 client id - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - client_secret: - description: The secret containing the OAuth2 - client secret - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - client_secret_file: - description: ClientSecretFile defines path for - client secret file. - type: string - endpoint_params: - additionalProperties: - type: string - description: Parameters to append to the token - URL - type: object - proxy_url: - description: |- - The proxy URL for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - type: string - scopes: - description: OAuth2 scopes used for the token - request - items: - type: string - type: array - tls_config: - description: |- - TLSConfig for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - x-kubernetes-preserve-unknown-fields: true - token_url: - description: The URL to fetch the token from - minLength: 1 - type: string - required: - - client_id - - token_url - type: object - proxyURL: - description: Optional proxy URL. - type: string - tls_config: - description: TLS configuration for the client. - properties: - ca: - description: Struct containing the CA cert to - use for the targets. - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container - to use for the targets. - type: string - cert: - description: Struct containing the client cert - file for the targets. - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the - container for the targets. + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + interval: + type: string + keep_metric_names: + type: boolean + match: + x-kubernetes-preserve-unknown-fields: true + no_align_flush_to_interval: + type: boolean + output_relabel_configs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the - container for the targets. + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: type: string - keySecret: - description: Secret containing the client key - file for the targets. - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the - targets. + type: array + sourceLabels: + items: type: string - type: object - type: object - message_type: - description: Describes the behavior of the alert (CRITICAL, - WARNING, INFO). - type: string - monitoring_tool: - description: The monitoring tool the state message is - from. - type: string - routing_key: - description: A key used to map the alert to a team. - type: string - send_resolved: - description: SendResolved controls notify about resolved - alerts. - type: boolean - state_message: - description: Contains long explanation of the alerted - problem. + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + outputs: + items: + type: string + type: array + staleness_interval: type: string + without: + items: + type: string + type: array required: - - routing_key + - interval + - outputs type: object type: array - webex_configs: - items: - properties: - api_url: - description: The Webex Teams API URL, i.e. https://webexapis.com/v1/messages - type: string - http_config: - description: HTTP client configuration. You must use this - configuration to supply the bot token as part of the - HTTP `Authorization` header. - properties: - authorization: - description: |- - Authorization header configuration for the client. - This is mutually exclusive with BasicAuth and is only available starting from Alertmanager v0.22+. - properties: - credentials: - description: Reference to the secret with value - for authorization - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization - type: string - type: - description: Type of authorization, default to - bearer - type: string - type: object - basic_auth: - description: BasicAuth for the client. - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearer_token_file: - description: BearerTokenFile defines filename for - bearer token, it must be mounted to pod. - type: string - bearer_token_secret: - description: |- - The secret's key that contains the bearer token - It must be at them same namespace as CRD - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - oauth2: - description: OAuth2 client credentials used to fetch - a token for the targets. - properties: - client_id: - description: The secret or configmap containing - the OAuth2 client id - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + updateStrategy: + enum: + - Recreate + - RollingUpdate + type: string + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + useVMConfigReloader: + type: boolean + vmAgentExternalLabelName: + type: string + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + required: + - remoteWrite + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + replicas: + format: int32 + type: integer + selector: + type: string + shards: + format: int32 + type: integer + updateStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + scale: + labelSelectorPath: .status.selector + specReplicasPath: .spec.shardCount + statusReplicasPath: .status.shards + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.18.0 + name: vmalertmanagerconfigs.operator.victoriametrics.com +spec: + group: operator.victoriametrics.com + names: + kind: VMAlertmanagerConfig + listKind: VMAlertmanagerConfigList + plural: vmalertmanagerconfigs + singular: vmalertmanagerconfig + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.updateStatus + name: Status + type: string + - jsonPath: .status.reason + name: Sync Error + type: string + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + inhibit_rules: + items: + properties: + equal: + items: + type: string + type: array + source_matchers: + items: + type: string + type: array + target_matchers: + items: + type: string + type: array + type: object + type: array + receivers: + items: + properties: + discord_configs: + items: + properties: + avatar_url: + type: string + content: + maxLength: 2000 + type: string + http_config: + properties: + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - type: object - client_secret: - description: The secret containing the OAuth2 - client secret - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - client_secret_file: - description: ClientSecretFile defines path for - client secret file. - type: string - endpoint_params: - additionalProperties: + type: object + x-kubernetes-map-type: atomic + credentialsFile: type: string - description: Parameters to append to the token - URL - type: object - proxy_url: - description: |- - The proxy URL for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - type: string - scopes: - description: OAuth2 scopes used for the token - request - items: + type: type: string - type: array - tls_config: - description: |- - TLSConfig for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - x-kubernetes-preserve-unknown-fields: true - token_url: - description: The URL to fetch the token from - minLength: 1 - type: string - required: - - client_id - - token_url - type: object - proxyURL: - description: Optional proxy URL. - type: string - tls_config: - description: TLS configuration for the client. - properties: - ca: - description: Struct containing the CA cert to - use for the targets. - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: + type: object + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container - to use for the targets. - type: string - cert: - description: Struct containing the client cert - file for the targets. - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token_file: + type: string + bearer_token_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the - container for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the - container for the targets. - type: string - keySecret: - description: Secret containing the client key - file for the targets. - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the - targets. - type: string - type: object - type: object - message: - description: The message body template - type: string - room_id: - description: The ID of the Webex Teams room where to send - the messages - type: string - send_resolved: - description: SendResolved controls notify about resolved - alerts. - type: boolean - required: - - room_id - type: object - type: array - webhook_configs: - description: WebhookConfigs defines webhook notification configurations. - items: - description: |- - WebhookConfig configures notifications via a generic receiver supporting the webhook payload. - See https://prometheus.io/docs/alerting/latest/configuration/#webhook_config - properties: - http_config: - description: HTTP client configuration. - type: object - x-kubernetes-preserve-unknown-fields: true - max_alerts: - description: Maximum number of alerts to be sent per webhook - message. When 0, all alerts are included. - format: int32 - minimum: 0 - type: integer - send_resolved: - description: SendResolved controls notify about resolved - alerts. - type: boolean - timeout: - description: |- - Timeout is the maximum time allowed to invoke the webhook - available since v0.28.0 alertmanager version - pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ - type: string - url: - description: |- - URL to send requests to, - one of `urlSecret` and `url` must be defined. - type: string - url_secret: - description: |- - URLSecret defines secret name and key at the CRD namespace. - It must contain the webhook URL. - one of `urlSecret` and `url` must be defined. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - type: array - wechat_configs: - description: WeChatConfigs defines wechat notification configurations. - items: - description: |- - WeChatConfig configures notifications via WeChat. - See https://prometheus.io/docs/alerting/latest/configuration/#wechat_config - properties: - agent_id: - type: string - api_secret: - description: |- - The secret's key that contains the WeChat API key. - The secret needs to be in the same namespace as the AlertmanagerConfig - fallback to global alertmanager setting if empty - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - api_url: - description: |- - The WeChat API URL. - fallback to global alertmanager setting if empty - type: string - corp_id: - description: |- - The corp id for authentication. - fallback to global alertmanager setting if empty - type: string - http_config: - description: HTTP client configuration. - properties: - authorization: - description: |- - Authorization header configuration for the client. - This is mutually exclusive with BasicAuth and is only available starting from Alertmanager v0.22+. - properties: - credentials: - description: Reference to the secret with value - for authorization - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization - type: string - type: - description: Type of authorization, default to - bearer - type: string - type: object - basic_auth: - description: BasicAuth for the client. - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearer_token_file: - description: BearerTokenFile defines filename for - bearer token, it must be mounted to pod. - type: string - bearer_token_secret: - description: |- - The secret's key that contains the bearer token - It must be at them same namespace as CRD - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - oauth2: - description: OAuth2 client credentials used to fetch - a token for the targets. - properties: - client_id: - description: The secret or configmap containing - the OAuth2 client id - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - client_secret: - description: The secret containing the OAuth2 - client secret - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. + type: object + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: + additionalProperties: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: object + proxy_url: + type: string + scopes: + items: type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - client_secret_file: - description: ClientSecretFile defines path for - client secret file. - type: string - endpoint_params: - additionalProperties: + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 type: string - description: Parameters to append to the token - URL - type: object - proxy_url: - description: |- - The proxy URL for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - type: string - scopes: - description: OAuth2 scopes used for the token - request - items: + required: + - client_id + - token_url + type: object + proxyURL: + type: string + tls_config: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: type: string - type: array - tls_config: - description: |- - TLSConfig for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - x-kubernetes-preserve-unknown-fields: true - token_url: - description: The URL to fetch the token from - minLength: 1 - type: string - required: - - client_id - - token_url - type: object - proxyURL: - description: Optional proxy URL. - type: string - tls_config: - description: TLS configuration for the client. - properties: - ca: - description: Struct containing the CA cert to - use for the targets. - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container - to use for the targets. - type: string - cert: - description: Struct containing the client cert - file for the targets. - properties: - configMap: - description: ConfigMap containing data to - use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use - for the targets. - properties: - key: - description: The key of the secret to - select from. Must be a valid secret - key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret - or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the - container for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the - container for the targets. - type: string - keySecret: - description: Secret containing the client key - file for the targets. - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the - targets. - type: string - type: object - type: object - message: - description: API request data as defined by the WeChat - API. - type: string - message_type: - type: string - send_resolved: - description: SendResolved controls notify about resolved - alerts. - type: boolean - to_party: - type: string - to_tag: - type: string - to_user: - type: string - type: object - type: array - required: - - name - type: object - type: array - route: - description: Route definition for alertmanager, may include nested - routes. - properties: - active_time_intervals: - description: |- - ActiveTimeIntervals Times when the route should be active - These must match the name at time_intervals - items: - type: string - type: array - continue: - description: |- - Continue indicating whether an alert should continue matching subsequent - sibling nodes. It will always be true for the first-level route if disableRouteContinueEnforce for vmalertmanager not set. - type: boolean - group_by: - description: List of labels to group by. - items: - type: string - type: array - group_interval: - description: How long to wait before sending an updated notification. - pattern: '[0-9]+(ms|s|m|h)' - type: string - group_wait: - description: How long to wait before sending the initial notification. - pattern: '[0-9]+(ms|s|m|h)' - type: string - matchers: - description: |- - List of matchers that the alert’s labels should match. For the first - level route, the operator adds a namespace: "CRD_NS" matcher. - https://prometheus.io/docs/alerting/latest/configuration/#matcher - items: - type: string - type: array - mute_time_intervals: - description: MuteTimeIntervals is a list of interval names that - will mute matched alert - items: - type: string - type: array - receiver: - description: Name of the receiver for this route. - type: string - repeat_interval: - description: How long to wait before repeating the last notification. - pattern: '[0-9]+(ms|s|m|h)' - type: string - routes: - description: |- - Child routes. - https://prometheus.io/docs/alerting/latest/configuration/#route - items: - x-kubernetes-preserve-unknown-fields: true - type: array - required: - - receiver - type: object - time_intervals: - description: |- - TimeIntervals defines named interval for active/mute notifications interval - See https://prometheus.io/docs/alerting/latest/configuration/#time_interval - items: - description: TimeIntervals for alerts - properties: - name: - description: Name of interval - type: string - time_intervals: - description: TimeIntervals interval configuration - items: - description: TimeInterval defines intervals of time - properties: - days_of_month: - description: |- - DayOfMonth defines list of numerical days in the month. Days begin at 1. Negative values are also accepted. - for example, ['1:5', '-3:-1'] - items: + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + type: object + message: type: string - type: array - location: - description: Location in golang time location form, e.g. - UTC - type: string - months: - description: |- - Months defines list of calendar months identified by a case-insensitive name (e.g. ‘January’) or numeric 1. - For example, ['1:3', 'may:august', 'december'] - items: + send_resolved: + type: boolean + title: type: string - type: array - times: - description: Times defines time range for mute - items: - description: TimeRange ranges inclusive of the starting - time and exclusive of the end time + username: + type: string + webhook_url: + type: string + webhook_url_secret: properties: - end_time: - description: EndTime for example HH:MM + key: type: string - start_time: - description: StartTime for example HH:MM + name: + default: "" type: string + optional: + type: boolean required: - - end_time - - start_time + - key type: object - type: array - weekdays: - description: Weekdays defines list of days of the week, - where the week begins on Sunday and ends on Saturday. - items: - type: string - type: array - years: - description: |- - Years defines numerical list of years, ranges are accepted. - For example, ['2020:2022', '2030'] - items: - type: string - type: array - type: object - type: array - required: - - name - - time_intervals - type: object - type: array - required: - - receivers - - route - type: object - status: - description: VMAlertmanagerConfigStatus defines the observed state of - VMAlertmanagerConfig - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 - type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - lastErrorParentAlertmanagerName: - type: string - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.18.0 - name: vmalertmanagers.operator.victoriametrics.com -spec: - group: operator.victoriametrics.com - names: - kind: VMAlertmanager - listKind: VMAlertmanagerList - plural: vmalertmanagers - shortNames: - - vma - singular: vmalertmanager - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: The desired replicas number of Alertmanagers - jsonPath: .spec.replicaCount - name: ReplicaCount - type: integer - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - description: Current update status - jsonPath: .status.updateStatus - name: Update Status - type: string - name: v1beta1 - schema: - openAPIV3Schema: - description: VMAlertmanager represents Victoria-Metrics deployment for Alertmanager. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: |- - Specification of the desired behavior of the VMAlertmanager cluster. More info: - https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - properties: - additionalPeers: - description: AdditionalPeers allows injecting a set of additional - Alertmanagers to peer with to form a highly available cluster. - items: - type: string - type: array - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - claimTemplates: - description: ClaimTemplates allows adding additional VolumeClaimTemplates - for StatefulSet - items: - description: PersistentVolumeClaim is a user's request for and claim - to a persistent volume - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - description: |- - Standard object's metadata. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - type: object - x-kubernetes-preserve-unknown-fields: true - spec: - description: |- - spec defines the desired characteristics of a volume requested by a pod author. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - x-kubernetes-list-type: atomic - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name + x-kubernetes-map-type: atomic type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + type: array + email_configs: + items: properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced + auth_identity: type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - type: string - required: - - kind - - name - type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + auth_password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: + x-kubernetes-map-type: atomic + auth_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: + type: object + x-kubernetes-map-type: atomic + auth_username: + type: string + from: + type: string + headers: additionalProperties: type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. type: object + hello: + type: string + html: + type: string + require_tls: + type: boolean + send_resolved: + type: boolean + smarthost: + type: string + text: + type: string + tls_config: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + to: + type: string type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string or nil value indicates that no - VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, - this field can be reset to its previous value (including nil) to cancel the modification. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the - PersistentVolume backing this claim. - type: string - type: object - status: - description: |- - status represents the current information/status of a persistent volume claim. - Read-only. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the actual access modes the volume backing the PVC has. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - x-kubernetes-list-type: atomic - allocatedResourceStatuses: - additionalProperties: - description: |- - When a controller receives persistentvolume claim update with ClaimResourceStatus for a resource - that it does not recognizes, then it should ignore that update and let other controllers - handle it. - type: string - description: "allocatedResourceStatuses stores status of - resource being resized for the given PVC.\nKey names follow - standard Kubernetes label syntax. Valid values are either:\n\t* - Un-prefixed keys:\n\t\t- storage - the capacity of the - volume.\n\t* Custom resources must use implementation-defined - prefixed names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or have kubernetes.io - prefix are considered\nreserved and hence may not be used.\n\nClaimResourceStatus - can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState - set when resize controller starts resizing the volume - in control-plane.\n\t- ControllerResizeFailed:\n\t\tState - set when resize has failed in resize controller with a - terminal error.\n\t- NodeResizePending:\n\t\tState set - when resize controller has finished resizing the volume - but further resizing of\n\t\tvolume is needed on the node.\n\t- - NodeResizeInProgress:\n\t\tState set when kubelet starts - resizing the volume.\n\t- NodeResizeFailed:\n\t\tState - set when resizing has failed in kubelet with a terminal - error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor - example: if expanding a PVC for more capacity - this field - can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeFailed\"\nWhen this field is not set, it - means that no resize operation is in progress for the - given PVC.\n\nA controller that receives PVC update with - previously unknown resourceName or ClaimResourceStatus\nshould - ignore the update for the purpose it was designed. For - example - a controller that\nonly is responsible for resizing - capacity of the volume, should ignore PVC updates that - change other valid\nresources associated with PVC.\n\nThis - is an alpha field and requires enabling RecoverVolumeExpansionFailure - feature." - type: object - x-kubernetes-map-type: granular - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: "allocatedResources tracks the resources allocated - to a PVC including its capacity.\nKey names follow standard - Kubernetes label syntax. Valid values are either:\n\t* - Un-prefixed keys:\n\t\t- storage - the capacity of the - volume.\n\t* Custom resources must use implementation-defined - prefixed names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or have kubernetes.io - prefix are considered\nreserved and hence may not be used.\n\nCapacity - reported here may be larger than the actual capacity when - a volume expansion operation\nis requested.\nFor storage - quota, the larger value from allocatedResources and PVC.spec.resources - is used.\nIf allocatedResources is not set, PVC.spec.resources - alone is used for quota calculation.\nIf a volume expansion - capacity request is lowered, allocatedResources is only\nlowered - if there are no expansion operations in progress and if - the actual volume capacity\nis equal or lower than the - requested capacity.\n\nA controller that receives PVC - update with previously unknown resourceName\nshould ignore - the update for the purpose it was designed. For example - - a controller that\nonly is responsible for resizing - capacity of the volume, should ignore PVC updates that - change other valid\nresources associated with PVC.\n\nThis - is an alpha field and requires enabling RecoverVolumeExpansionFailure - feature." - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: capacity represents the actual resources of - the underlying volume. - type: object - conditions: - description: |- - conditions is the current Condition of persistent volume claim. If underlying persistent volume is being - resized then the Condition will be set to 'Resizing'. - items: - description: PersistentVolumeClaimCondition contains details - about state of pvc - properties: - lastProbeTime: - description: lastProbeTime is the time we probed the - condition. - format: date-time - type: string - lastTransitionTime: - description: lastTransitionTime is the time the condition - transitioned from one status to another. - format: date-time - type: string - message: - description: message is the human-readable message - indicating details about last transition. - type: string - reason: - description: |- - reason is a unique, this should be a short, machine understandable string that gives the reason - for condition's last transition. If it reports "Resizing" that means the underlying - persistent volume is being resized. - type: string - status: - description: |- - Status is the status of the condition. - Can be True, False, Unknown. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required - type: string - type: - description: |- - Type is the type of the condition. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about - type: string - required: - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - currentVolumeAttributesClassName: - description: |- - currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. - When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim - type: string - modifyVolumeStatus: - description: |- - ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. - When this is unset, there is no ModifyVolume operation being attempted. + type: array + incidentio_configs: + items: properties: - status: - description: "status is the status of the ControllerModifyVolume - operation. It can be in any of following states:\n - - Pending\n Pending indicates that the PersistentVolumeClaim - cannot be modified due to unmet requirements, such - as\n the specified VolumeAttributesClass not existing.\n - - InProgress\n InProgress indicates that the volume - is being modified.\n - Infeasible\n Infeasible indicates - that the request has been rejected as invalid by the - CSI driver. To\n\t resolve the error, a valid VolumeAttributesClass - needs to be specified.\nNote: New statuses can be - added in the future. Consumers should check for unknown - statuses and fail appropriately." - type: string - targetVolumeAttributesClassName: - description: targetVolumeAttributesClassName is the - name of the VolumeAttributesClass the PVC currently - being reconciled + alert_source_token: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + http_config: + x-kubernetes-preserve-unknown-fields: true + max_alerts: + type: integer + send_resolved: + type: boolean + timeout: type: string - required: - - status - type: object - phase: - description: phase represents the current phase of PersistentVolumeClaim. - type: string - type: object - type: object - type: array - clusterAdvertiseAddress: - description: |- - ClusterAdvertiseAddress is the explicit address to advertise in cluster. - Needs to be provided for non RFC1918 [1] (public) addresses. - [1] RFC1918: https://tools.ietf.org/html/rfc1918 - type: string - clusterDomainName: - description: |- - ClusterDomainName defines domain name suffix for in-cluster dns addresses - aka .cluster.local - used to build pod peer addresses for in-cluster communication - type: string - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: - type: string - type: array - configNamespaceSelector: - description: |2- - ConfigNamespaceSelector defines namespace selector for VMAlertmanagerConfig. - Works in combination with Selector. - NamespaceSelector nil - only objects at VMAlertmanager namespace. - Selector nil - only objects at NamespaceSelector namespaces. - If both nil - behaviour controlled by selectAllByDefault - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - configRawYaml: - description: |- - ConfigRawYaml - raw configuration for alertmanager, - it helps it to start without secret. - priority -> hardcoded ConfigRaw -> ConfigRaw, provided by user -> ConfigSecret. - type: string - configReloadAuthKeySecret: - description: |- - ConfigReloadAuthKeySecret defines optional secret reference authKey for /-/reload API requests. - Given secret reference will be added to the application and vm-config-reloader as volume - available since v0.57.0 version - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - configReloaderExtraArgs: - additionalProperties: - type: string - description: |- - ConfigReloaderExtraArgs that will be passed to VMAuths config-reloader container - for example resyncInterval: "30s" - type: object - configReloaderImageTag: - description: ConfigReloaderImageTag defines image:tag for config-reloader - container - type: string - configReloaderResources: - description: |- - ConfigReloaderResources config-reloader container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - configSecret: - description: |- - ConfigSecret is the name of a Kubernetes Secret in the same namespace as the - VMAlertmanager object, which contains configuration for this VMAlertmanager, - configuration must be inside secret key: alertmanager.yaml. - It must be created by user. - instance. Defaults to 'vmalertmanager-' - The secret is mounted into /etc/alertmanager/config. - type: string - configSelector: - description: |- - ConfigSelector defines selector for VMAlertmanagerConfig, result config will be merged with with Raw or Secret config. - Works in combination with NamespaceSelector. - NamespaceSelector nil - only objects at VMAlertmanager namespace. - Selector nil - only objects at NamespaceSelector namespaces. - If both nil - behaviour controlled by selectAllByDefault - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to run - within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableNamespaceMatcher: - description: |- - DisableNamespaceMatcher disables adding top route label matcher "namespace = " for VMAlertmanagerConfig - It may be useful if alert doesn't have namespace label for some reason - type: boolean - disableRouteContinueEnforce: - description: DisableRouteContinueEnforce cancel the behavior for VMAlertmanagerConfig - that always enforce first-level route continue to true - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: - x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. - properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this DNS resolver option's value. - type: string - type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - enforcedNamespaceLabel: - description: |- - EnforcedNamespaceLabel defines the namespace label key for top route matcher for VMAlertmanagerConfig - Default is "namespace" - type: string - enforcedTopRouteMatchers: - description: |- - EnforcedTopRouteMatchers defines label matchers to be added for the top route - of VMAlertmanagerConfig - It allows to make some set of labels required for alerts. - https://prometheus.io/docs/alerting/latest/configuration/#matcher - items: - type: string - type: array - externalURL: - description: |- - ExternalURL the VMAlertmanager instances will be available under. This is - necessary to generate correct URLs. This is necessary if VMAlertmanager is not - served from root of a DNS name. - type: string - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application container - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of ConfigMaps - or Secrets - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - gossipConfig: - description: GossipConfig defines gossip TLS configuration for Alertmanager - cluster - properties: - tls_client_config: - description: TLSClientConfig defines client TLS configuration - for alertmanager - properties: - ca_file: - description: |- - CAFile defines path to the pre-mounted file with CA - mutually exclusive with CASecretRef - type: string - ca_secret_ref: - description: |- - CA defines reference for secret with CA content under given key - mutually exclusive with CAFile - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - cert_file: - description: |- - CertFile defines path to the pre-mounted file with certificate - mutually exclusive with CertSecretRef - type: string - cert_secret_ref: - description: |- - CertSecretRef defines reference for secret with certificate content under given key - mutually exclusive with CertFile - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - insecure_skip_verify: - description: |- - Cert defines reference for secret with CA content under given key - mutually exclusive with CertFile - type: boolean - key_file: - description: |- - KeyFile defines path to the pre-mounted file with certificate key - mutually exclusive with KeySecretRef - type: string - key_secret_ref: - description: |- - Key defines reference for secret with certificate key content under given key - mutually exclusive with KeyFile - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - server_name: - description: ServerName indicates a name of a server - type: string - type: object - tls_server_config: - description: TLSServerConfig defines server TLS configuration - for alertmanager - properties: - cert_file: - description: |- - CertFile defines path to the pre-mounted file with certificate - mutually exclusive with CertSecretRef - type: string - cert_secret_ref: - description: |- - CertSecretRef defines reference for secret with certificate content under given key - mutually exclusive with CertFile - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - cipher_suites: - description: |- - CipherSuites defines list of supported cipher suites for TLS versions up to TLS 1.2 - https://golang.org/pkg/crypto/tls/#pkg-constants - items: - type: string + url: + type: string + type: object type: array - client_auth_type: - description: |- - Cert defines reference for secret with CA content under given key - mutually exclusive with CertFile - ClientAuthType defines server policy for client authentication - If you want to enable client authentication (aka mTLS), you need to use RequireAndVerifyClientCert - Note, mTLS is supported only at enterprise version of VictoriaMetrics components - enum: - - NoClientCert - - RequireAndVerifyClientCert - type: string - client_ca_file: - description: |- - ClientCAFile defines path to the pre-mounted file with CA - mutually exclusive with ClientCASecretRef - type: string - client_ca_secret_ref: - description: |- - ClientCASecretRef defines reference for secret with CA content under given key - mutually exclusive with ClientCAFile - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - curve_preferences: - description: |- - CurvePreferences defines elliptic curves that will be used in an ECDHE handshake, in preference order. - https://golang.org/pkg/crypto/tls/#CurveID + jira_configs: items: - type: string - type: array - key_file: - description: |- - KeyFile defines path to the pre-mounted file with certificate key - mutually exclusive with KeySecretRef - type: string - key_secret_ref: - description: |- - Key defines reference for secret with certificate key content under given key - mutually exclusive with KeyFile - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - max_version: - description: MaxVersion maximum TLS version that is acceptable. - enum: - - TLS10 - - TLS11 - - TLS12 - - TLS13 - type: string - min_version: - description: MinVersion minimum TLS version that is acceptable. - enum: - - TLS10 - - TLS11 - - TLS12 - - TLS13 - type: string - prefer_server_cipher_suites: - description: |- - PreferServerCipherSuites controls whether the server selects the - client's most preferred ciphersuite - type: boolean - type: object - type: object - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the node - network namespace - type: boolean - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image + it's repository - if needed - type: string - tag: - description: Tag contains desired docker image version - type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - type: array - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to run - within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - listenLocal: - description: |- - ListenLocal makes the VMAlertmanager server listen on loopback, so that it - does not bind against the Pod IP. Note this is only for the VMAlertmanager - UI, not the gossip communication. - type: boolean - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logFormat: - description: LogFormat for VMAlertmanager to be configured with. - enum: - - logfmt - - json - type: string - logLevel: - description: Log level for VMAlertmanager to be configured with. - enum: - - debug - - info - - warn - - error - - DEBUG - - INFO - - WARN - - ERROR - type: string - managedMetadata: - description: |- - ManagedMetadata defines metadata that will be added to the all objects - created by operator for the given CustomResource - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - type: object - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - nodeSelector: - additionalProperties: - type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - persistentVolumeClaimRetentionPolicy: - description: PersistentVolumeClaimRetentionPolicy allows configuration - of PVC retention policy - properties: - whenDeleted: - description: |- - WhenDeleted specifies what happens to PVCs created from StatefulSet - VolumeClaimTemplates when the StatefulSet is deleted. The default policy - of `Retain` causes PVCs to not be affected by StatefulSet deletion. The - `Delete` policy causes those PVCs to be deleted. - type: string - whenScaled: - description: |- - WhenScaled specifies what happens to PVCs created from StatefulSet - VolumeClaimTemplates when the StatefulSet is scaled down. The default - policy of `Retain` causes PVCs to not be affected by a scaledown. The - `Delete` policy causes the associated PVCs for any excess pods above - the replica count to be deleted. - type: string - type: object - podDisruptionBudget: - description: PodDisruptionBudget created by operator - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at most "maxUnavailable" pods selected by - "selector" are unavailable after the eviction, i.e. even in absence of - the evicted pod. For example, one can prevent all voluntary evictions - by specifying 0. This is a mutually exclusive setting with "minAvailable". - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at least "minAvailable" pods selected by - "selector" will still be available after the eviction, i.e. even in the - absence of the evicted pod. So for example you can prevent all voluntary - evictions by specifying "100%". - x-kubernetes-int-or-string: true - selectorLabels: - additionalProperties: - type: string - description: |- - replaces default labels selector generated by operator - it's useful when you need to create custom budget - type: object - unhealthyPodEvictionPolicy: - description: |- - UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods - - Valid policies are IfHealthyBudget and AlwaysAllow. - If no policy is specified, the default behavior will be used, - which corresponds to the IfHealthyBudget policy. - Available from operator v0.64.0 - enum: - - IfHealthyBudget - - AlwaysAllow - type: string - type: object - podMetadata: - description: PodMetadata configures Labels and Annotations which are - propagated to the alertmanager pods. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - port: - description: Port listen address - type: string - portName: - description: |- - PortName used for the pods and governing service. - This defaults to web - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods - type: string - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod condition - properties: - conditionType: - description: ConditionType refers to a condition in the pod's - condition list with matching type. - type: string - required: - - conditionType - type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - retention: - description: |- - Retention Time duration VMAlertmanager shall retain data for. Default is '120h', - and must match the regular expression `[0-9]+(ms|s|m|h)` (milliseconds seconds minutes hours). - pattern: '[0-9]+(ms|s|m|h)' - type: string - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - rollingUpdateStrategy: - description: |- - RollingUpdateStrategy defines strategy for application updates - Default is OnDelete, in this case operator handles update process - Can be changed for RollingUpdate - type: string - routePrefix: - description: |- - RoutePrefix VMAlertmanager registers HTTP handlers for. This is useful, - if using ExternalURL and a proxy is rewriting HTTP routes of a request, - and the actual ExternalURL is still true, but the server serves requests - under a different route prefix. For example for use with `kubectl proxy`. - type: string - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: - type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - selectAllByDefault: - description: |- - SelectAllByDefault changes default behavior for empty CRD selectors, such ConfigSelector. - with selectAllByDefault: true and undefined ConfigSelector and ConfigNamespaceSelector - Operator selects all exist alertManagerConfigs - with selectAllByDefault: false - selects nothing - type: boolean - serviceAccountName: - description: ServiceAccountName is the name of the ServiceAccount - to use to run the pods - type: string - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vmalertmanager - VMServiceScrape spec - required: - - endpoints - type: object - x-kubernetes-preserve-unknown-fields: true - serviceSpec: - description: ServiceSpec that will be added to vmalertmanager service - spec - properties: - metadata: - description: EmbeddedObjectMetadata defines objectMeta for additional - service. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - spec: - description: |- - ServiceSpec describes the attributes that a user creates on a service. - More info: https://kubernetes.io/docs/concepts/services-networking/service/ - type: object - x-kubernetes-preserve-unknown-fields: true - useAsDefault: - description: |- - UseAsDefault applies changes from given service definition to the main object Service - Changing from headless service to clusterIP or loadbalancer may break cross-component communication - type: boolean - required: - - spec - type: object - startupProbe: - description: StartupProbe that will be added to CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - storage: - description: |- - Storage is the definition of how storage will be used by the VMAlertmanager - instances. - properties: - disableMountSubPath: - description: |- - Deprecated: subPath usage will be disabled by default in a future release, this option will become unnecessary. - DisableMountSubPath allows to remove any subPath usage in volume mounts. - type: boolean - emptyDir: - description: |- - EmptyDirVolumeSource to be used by the Prometheus StatefulSets. If specified, used in place of any volumeClaimTemplate. More - info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir - properties: - medium: - description: |- - medium represents what type of storage medium should back this directory. - The default is "" which means to use the node's default medium. - Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: |- - sizeLimit is the total amount of local storage required for this EmptyDir volume. - The size limit is also applicable for memory medium. - The maximum usage on memory medium EmptyDir would be the minimum value between - the SizeLimit specified here and the sum of memory limits of all containers in a pod. - The default is nil which means that the limit is undefined. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - volumeClaimTemplate: - description: A PVC spec to be used by the StatefulSets/Deployments. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to - an EmbeddedResource. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: + properties: + api_url: type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - spec: - description: |- - Spec defines the desired characteristics of a volume requested by a pod author. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: + custom_fields: + additionalProperties: + x-kubernetes-preserve-unknown-fields: true + type: object + http_config: + x-kubernetes-preserve-unknown-fields: true + issue_type: type: string - type: array - x-kubernetes-list-type: atomic - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + labels: + items: type: string - required: - - kind - - name - type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - selector: - description: selector is a label query over volumes to - consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. + type: array + priority: + type: string + project: + type: string + reopen_duration: + pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ + type: string + reopen_transition: + type: string + resolve_transition: + type: string + send_resolved: + type: boolean + summary: + type: string + wont_fix_resolution: + type: string + required: + - issue_type + - project + type: object + type: array + msteams_configs: + items: + properties: + http_config: + properties: + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + credentialsFile: + type: string + type: + type: string + type: object + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token_file: + type: string + bearer_token_secret: properties: key: - description: key is the label key that the selector - applies to. type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. + name: + default: "" type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic + optional: + type: boolean required: - - key - - operator + - key type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string or nil value indicates that no - VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, - this field can be reset to its previous value (including nil) to cancel the modification. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the - PersistentVolume backing this claim. - type: string - type: object - status: - description: |- - Status represents the current information/status of a persistent volume claim. - Read-only. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the actual access modes the volume backing the PVC has. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: + x-kubernetes-map-type: atomic + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: + additionalProperties: + type: string + type: object + proxy_url: + type: string + scopes: + items: + type: string + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url + type: object + proxyURL: + type: string + tls_config: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + type: object + send_resolved: + type: boolean + text: type: string - type: array - x-kubernetes-list-type: atomic - allocatedResourceStatuses: - additionalProperties: - description: |- - When a controller receives persistentvolume claim update with ClaimResourceStatus for a resource - that it does not recognizes, then it should ignore that update and let other controllers - handle it. - type: string - description: "allocatedResourceStatuses stores status - of resource being resized for the given PVC.\nKey names - follow standard Kubernetes label syntax. Valid values - are either:\n\t* Un-prefixed keys:\n\t\t- storage - - the capacity of the volume.\n\t* Custom resources must - use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or have - kubernetes.io prefix are considered\nreserved and hence - may not be used.\n\nClaimResourceStatus can be in any - of following states:\n\t- ControllerResizeInProgress:\n\t\tState - set when resize controller starts resizing the volume - in control-plane.\n\t- ControllerResizeFailed:\n\t\tState - set when resize has failed in resize controller with - a terminal error.\n\t- NodeResizePending:\n\t\tState - set when resize controller has finished resizing the - volume but further resizing of\n\t\tvolume is needed - on the node.\n\t- NodeResizeInProgress:\n\t\tState set - when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState - set when resizing has failed in kubelet with a terminal - error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor - example: if expanding a PVC for more capacity - this - field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeFailed\"\nWhen this field is not set, - it means that no resize operation is in progress for - the given PVC.\n\nA controller that receives PVC update - with previously unknown resourceName or ClaimResourceStatus\nshould - ignore the update for the purpose it was designed. For - example - a controller that\nonly is responsible for - resizing capacity of the volume, should ignore PVC updates - that change other valid\nresources associated with PVC.\n\nThis - is an alpha field and requires enabling RecoverVolumeExpansionFailure - feature." - type: object - x-kubernetes-map-type: granular - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: "allocatedResources tracks the resources - allocated to a PVC including its capacity.\nKey names - follow standard Kubernetes label syntax. Valid values - are either:\n\t* Un-prefixed keys:\n\t\t- storage - - the capacity of the volume.\n\t* Custom resources must - use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or have - kubernetes.io prefix are considered\nreserved and hence - may not be used.\n\nCapacity reported here may be larger - than the actual capacity when a volume expansion operation\nis - requested.\nFor storage quota, the larger value from - allocatedResources and PVC.spec.resources is used.\nIf - allocatedResources is not set, PVC.spec.resources alone - is used for quota calculation.\nIf a volume expansion - capacity request is lowered, allocatedResources is only\nlowered - if there are no expansion operations in progress and - if the actual volume capacity\nis equal or lower than - the requested capacity.\n\nA controller that receives - PVC update with previously unknown resourceName\nshould - ignore the update for the purpose it was designed. For - example - a controller that\nonly is responsible for - resizing capacity of the volume, should ignore PVC updates - that change other valid\nresources associated with PVC.\n\nThis - is an alpha field and requires enabling RecoverVolumeExpansionFailure - feature." - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: capacity represents the actual resources - of the underlying volume. - type: object - conditions: - description: |- - conditions is the current Condition of persistent volume claim. If underlying persistent volume is being - resized then the Condition will be set to 'Resizing'. - items: - description: PersistentVolumeClaimCondition contains - details about state of pvc + title: + type: string + webhook_url: + type: string + webhook_url_secret: properties: - lastProbeTime: - description: lastProbeTime is the time we probed - the condition. - format: date-time + key: type: string - lastTransitionTime: - description: lastTransitionTime is the time the - condition transitioned from one status to another. - format: date-time + name: + default: "" type: string - message: - description: message is the human-readable message - indicating details about last transition. + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: array + msteamsv2_configs: + items: + properties: + http_config: + x-kubernetes-preserve-unknown-fields: true + send_resolved: + type: boolean + text: + type: string + title: + type: string + webhook_url: + type: string + webhook_url_secret: + properties: + key: type: string - reason: - description: |- - reason is a unique, this should be a short, machine understandable string that gives the reason - for condition's last transition. If it reports "Resizing" that means the underlying - persistent volume is being resized. + name: + default: "" type: string - status: - description: |- - Status is the status of the condition. - Can be True, False, Unknown. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: array + name: + minLength: 1 + type: string + opsgenie_configs: + items: + properties: + actions: + type: string + api_key: + properties: + key: type: string - type: - description: |- - Type is the type of the condition. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about + name: + default: "" type: string + optional: + type: boolean required: - - status - - type + - key type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - currentVolumeAttributesClassName: - description: |- - currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. - When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim - type: string - modifyVolumeStatus: - description: |- - ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. - When this is unset, there is no ModifyVolume operation being attempted. - properties: - status: - description: "status is the status of the ControllerModifyVolume - operation. It can be in any of following states:\n - - Pending\n Pending indicates that the PersistentVolumeClaim - cannot be modified due to unmet requirements, such - as\n the specified VolumeAttributesClass not existing.\n - - InProgress\n InProgress indicates that the volume - is being modified.\n - Infeasible\n Infeasible - indicates that the request has been rejected as - invalid by the CSI driver. To\n\t resolve the error, - a valid VolumeAttributesClass needs to be specified.\nNote: - New statuses can be added in the future. Consumers - should check for unknown statuses and fail appropriately." - type: string - targetVolumeAttributesClassName: - description: targetVolumeAttributesClassName is the - name of the VolumeAttributesClass the PVC currently - being reconciled + x-kubernetes-map-type: atomic + apiURL: + type: string + details: + additionalProperties: type: string - required: - - status - type: object - phase: - description: phase represents the current phase of PersistentVolumeClaim. - type: string - type: object - type: object - type: object - templates: - description: |- - Templates is a list of ConfigMap key references for ConfigMaps in the same namespace as the VMAlertmanager - object, which shall be mounted into the VMAlertmanager Pods. - The Templates are mounted into /etc/vm/templates//. - items: - description: ConfigMapKeyReference refers to a key in a ConfigMap. - properties: - key: - description: The ConfigMap key to refer to. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - required: - - key - type: object - x-kubernetes-map-type: atomic - type: array - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container graceful - termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread matching - pods among the given topology. - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - useVMConfigReloader: - description: |- - UseVMConfigReloader replaces prometheus-like config-reloader - with vm one. It uses secrets watch instead of file watch - which greatly increases speed of config updates - type: boolean - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that may - be accessed by any container in the pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - webConfig: - description: |- - WebConfig defines configuration for webserver - https://github.com/prometheus/alertmanager/blob/main/docs/https.md - properties: - basic_auth_users: - additionalProperties: - type: string - description: |- - BasicAuthUsers Usernames and hashed passwords that have full access to the web server - Passwords must be hashed with bcrypt - type: object - http_server_config: - description: HTTPServerConfig defines http server configuration - for alertmanager web server - properties: - headers: - additionalProperties: - type: string - description: Headers defines list of headers that can be added - to HTTP responses. - type: object - http2: - description: |- - HTTP2 enables HTTP/2 support. Note that HTTP/2 is only supported with TLS. - This can not be changed on the fly. - type: boolean - type: object - tls_server_config: - description: TLSServerConfig defines server TLS configuration - for alertmanager - properties: - cert_file: - description: |- - CertFile defines path to the pre-mounted file with certificate - mutually exclusive with CertSecretRef - type: string - cert_secret_ref: - description: |- - CertSecretRef defines reference for secret with certificate content under given key - mutually exclusive with CertFile - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - cipher_suites: - description: |- - CipherSuites defines list of supported cipher suites for TLS versions up to TLS 1.2 - https://golang.org/pkg/crypto/tls/#pkg-constants - items: - type: string + type: object + entity: + type: string + http_config: + type: object + x-kubernetes-preserve-unknown-fields: true + message: + type: string + note: + type: string + priority: + type: string + responders: + items: + properties: + id: + type: string + name: + type: string + type: + minLength: 1 + type: string + username: + type: string + required: + - type + type: object + type: array + send_resolved: + type: boolean + source: + type: string + tags: + type: string + update_alerts: + type: boolean + type: object type: array - client_auth_type: - description: |- - Cert defines reference for secret with CA content under given key - mutually exclusive with CertFile - ClientAuthType defines server policy for client authentication - If you want to enable client authentication (aka mTLS), you need to use RequireAndVerifyClientCert - Note, mTLS is supported only at enterprise version of VictoriaMetrics components - enum: - - NoClientCert - - RequireAndVerifyClientCert - type: string - client_ca_file: - description: |- - ClientCAFile defines path to the pre-mounted file with CA - mutually exclusive with ClientCASecretRef - type: string - client_ca_secret_ref: - description: |- - ClientCASecretRef defines reference for secret with CA content under given key - mutually exclusive with ClientCAFile - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - curve_preferences: - description: |- - CurvePreferences defines elliptic curves that will be used in an ECDHE handshake, in preference order. - https://golang.org/pkg/crypto/tls/#CurveID + pagerduty_configs: items: - type: string - type: array - key_file: - description: |- - KeyFile defines path to the pre-mounted file with certificate key - mutually exclusive with KeySecretRef - type: string - key_secret_ref: - description: |- - Key defines reference for secret with certificate key content under given key - mutually exclusive with KeyFile - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: + properties: + class: + type: string + client: + type: string + client_url: + type: string + component: + type: string + details: + additionalProperties: + type: string + type: object + group: + type: string + http_config: + type: object + x-kubernetes-preserve-unknown-fields: true + images: + items: + properties: + alt: + type: string + href: + type: string + source: + type: string + required: + - source + type: object + type: array + links: + items: + properties: + href: + type: string + text: + type: string + required: + - href + type: object + type: array + routing_key: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + send_resolved: + type: boolean + service_key: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + severity: + type: string + url: + type: string + type: object + type: array + pushover_configs: + items: + properties: + expire: + type: string + html: + type: boolean + http_config: + type: object + x-kubernetes-preserve-unknown-fields: true + message: + type: string + priority: + type: string + retry: + type: string + send_resolved: + type: boolean + sound: + type: string + title: + type: string + token: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + url: + type: string + url_title: + type: string + user_key: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: array + rocketchat_configs: + items: + properties: + actions: + items: + properties: + msg: + type: string + text: + type: string + type: + type: string + url: + type: string + type: object + type: array + api_url: + type: string + channel: + type: string + color: + type: string + emoji: + type: string + fields: + items: + properties: + short: + type: boolean + title: + type: string + value: + type: string + type: object + type: array + http_config: + x-kubernetes-preserve-unknown-fields: true + icon_url: + type: string + image_url: + type: string + link_names: + type: boolean + send_resolved: + type: boolean + short_fields: + type: boolean + text: + type: string + thumb_url: + type: string + title: + type: string + title_link: + type: string + token: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + token_id: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: array + slack_configs: + items: + properties: + actions: + items: + properties: + confirm: + properties: + dismiss_text: + type: string + ok_text: + type: string + text: + minLength: 1 + type: string + title: + type: string + required: + - text + type: object + name: + type: string + style: + type: string + text: + minLength: 1 + type: string + type: + minLength: 1 + type: string + url: + type: string + value: + type: string + required: + - text + - type + type: object + type: array + api_url: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + callback_id: + type: string + channel: + type: string + color: + type: string + fallback: + type: string + fields: + items: + properties: + short: + type: boolean + title: + minLength: 1 + type: string + value: + minLength: 1 + type: string + required: + - title + - value + type: object + type: array + footer: + type: string + http_config: + type: object + x-kubernetes-preserve-unknown-fields: true + icon_emoji: + type: string + icon_url: + type: string + image_url: + type: string + link_names: + type: boolean + mrkdwn_in: + items: + type: string + type: array + pretext: + type: string + send_resolved: + type: boolean + short_fields: + type: boolean + text: + type: string + thumb_url: + type: string + title: + type: string + title_link: + type: string + username: + type: string + type: object + type: array + sns_configs: + items: + properties: + api_url: + type: string + attributes: + additionalProperties: + type: string + type: object + http_config: + properties: + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + credentialsFile: + type: string + type: + type: string + type: object + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token_file: + type: string + bearer_token_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: + additionalProperties: + type: string + type: object + proxy_url: + type: string + scopes: + items: + type: string + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url + type: object + proxyURL: + type: string + tls_config: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + type: object + message: + type: string + phone_number: + type: string + send_resolved: + type: boolean + sigv4: + properties: + access_key: + type: string + access_key_selector: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + profile: + type: string + region: + type: string + role_arn: + type: string + secret_key_selector: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + subject: + type: string + target_arn: + type: string + topic_arn: + type: string + type: object + type: array + telegram_configs: + items: + properties: + api_url: + type: string + bot_token: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + chat_id: + type: integer + disable_notifications: + type: boolean + http_config: + type: object + x-kubernetes-preserve-unknown-fields: true + message: + type: string + message_thread_id: + type: integer + parse_mode: + type: string + send_resolved: + type: boolean + required: + - bot_token + - chat_id + type: object + type: array + victorops_configs: + items: + properties: + api_key: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + api_url: + type: string + custom_fields: + additionalProperties: + type: string + type: object + entity_display_name: + type: string + http_config: + properties: + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + credentialsFile: + type: string + type: + type: string + type: object + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token_file: + type: string + bearer_token_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: + additionalProperties: + type: string + type: object + proxy_url: + type: string + scopes: + items: + type: string + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url + type: object + proxyURL: + type: string + tls_config: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + type: object + message_type: + type: string + monitoring_tool: + type: string + routing_key: + type: string + send_resolved: + type: boolean + state_message: + type: string + required: + - routing_key + type: object + type: array + webex_configs: + items: + properties: + api_url: + type: string + http_config: + properties: + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + credentialsFile: + type: string + type: + type: string + type: object + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token_file: + type: string + bearer_token_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: + additionalProperties: + type: string + type: object + proxy_url: + type: string + scopes: + items: + type: string + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url + type: object + proxyURL: + type: string + tls_config: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + type: object + message: + type: string + room_id: + type: string + send_resolved: + type: boolean + required: + - room_id + type: object + type: array + webhook_configs: + items: + properties: + http_config: + type: object + x-kubernetes-preserve-unknown-fields: true + max_alerts: + format: int32 + minimum: 0 + type: integer + send_resolved: + type: boolean + timeout: + pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$ + type: string + url: + type: string + url_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + type: array + wechat_configs: + items: + properties: + agent_id: + type: string + api_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + api_url: + type: string + corp_id: + type: string + http_config: + properties: + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + credentialsFile: + type: string + type: + type: string + type: object + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token_file: + type: string + bearer_token_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: + additionalProperties: + type: string + type: object + proxy_url: + type: string + scopes: + items: + type: string + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url + type: object + proxyURL: + type: string + tls_config: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + type: object + message: + type: string + message_type: + type: string + send_resolved: + type: boolean + to_party: + type: string + to_tag: + type: string + to_user: + type: string + type: object + type: array + required: + - name + type: object + type: array + route: + properties: + active_time_intervals: + items: + type: string + type: array + continue: + type: boolean + group_by: + items: + type: string + type: array + group_interval: + pattern: '[0-9]+(ms|s|m|h)' + type: string + group_wait: + pattern: '[0-9]+(ms|s|m|h)' + type: string + matchers: + items: + type: string + type: array + mute_time_intervals: + items: + type: string + type: array + receiver: + type: string + repeat_interval: + pattern: '[0-9]+(ms|s|m|h)' + type: string + routes: + items: + x-kubernetes-preserve-unknown-fields: true + type: array + required: + - receiver + type: object + time_intervals: + items: + properties: + name: + type: string + time_intervals: + items: + properties: + days_of_month: + items: + type: string + type: array + location: + type: string + months: + items: + type: string + type: array + times: + items: + properties: + end_time: + type: string + start_time: + type: string + required: + - end_time + - start_time + type: object + type: array + weekdays: + items: + type: string + type: array + years: + items: + type: string + type: array + type: object + type: array + required: + - name + - time_intervals + type: object + type: array + required: + - receivers + - route + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + lastErrorParentAlertmanagerName: + type: string + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.18.0 + name: vmalertmanagers.operator.victoriametrics.com +spec: + group: operator.victoriametrics.com + names: + kind: VMAlertmanager + listKind: VMAlertmanagerList + plural: vmalertmanagers + shortNames: + - vma + singular: vmalertmanager + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.replicaCount + name: ReplicaCount + type: integer + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.updateStatus + name: Update Status + type: string + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + additionalPeers: + items: + type: string + type: array + affinity: + type: object + x-kubernetes-preserve-unknown-fields: true + claimTemplates: + items: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + x-kubernetes-preserve-unknown-fields: true + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + status: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + allocatedResourceStatuses: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + conditions: + items: + properties: + lastProbeTime: + format: date-time + type: string + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentVolumeAttributesClassName: + type: string + modifyVolumeStatus: + properties: + status: + type: string + targetVolumeAttributesClassName: + type: string + required: + - status + type: object + phase: + type: string + type: object + type: object + type: array + clusterAdvertiseAddress: + type: string + clusterDomainName: + type: string + configMaps: + items: + type: string + type: array + configNamespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + configRawYaml: + type: string + configReloadAuthKeySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + configReloaderExtraArgs: + additionalProperties: + type: string + type: object + configReloaderImageTag: + type: string + configReloaderResources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + configSecret: + type: string + configSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + containers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + disableAutomountServiceAccountToken: + type: boolean + disableNamespaceMatcher: + type: boolean + disableRouteContinueEnforce: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + enforcedNamespaceLabel: + type: string + enforcedTopRouteMatchers: + items: + type: string + type: array + externalURL: + type: string + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + gossipConfig: + properties: + tls_client_config: + properties: + ca_file: + type: string + ca_secret_ref: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + cert_file: + type: string + cert_secret_ref: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + insecure_skip_verify: + type: boolean + key_file: + type: string + key_secret_ref: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + server_name: + type: string + type: object + tls_server_config: + properties: + cert_file: + type: string + cert_secret_ref: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + cipher_suites: + items: + type: string + type: array + client_auth_type: + enum: + - NoClientCert + - RequireAndVerifyClientCert + type: string + client_ca_file: + type: string + client_ca_secret_ref: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + curve_preferences: + items: + type: string + type: array + key_file: + type: string + key_secret_ref: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + max_version: + enum: + - TLS10 + - TLS11 + - TLS12 + - TLS13 + type: string + min_version: + enum: + - TLS10 + - TLS11 + - TLS12 + - TLS13 + type: string + prefer_server_cipher_suites: + type: boolean + type: object + type: object + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + listenLocal: + type: boolean + livenessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + logFormat: + enum: + - logfmt + - json + type: string + logLevel: + enum: + - debug + - info + - warn + - error + - DEBUG + - INFO + - WARN + - ERROR + type: string + managedMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + persistentVolumeClaimRetentionPolicy: + properties: + whenDeleted: + type: string + whenScaled: + type: string + type: object + podDisruptionBudget: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow + type: string + type: object + podMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + port: + type: string + portName: + type: string + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + readinessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + retention: + pattern: '[0-9]+(ms|s|m|h)' + type: string + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdateStrategy: + type: string + routePrefix: + type: string + runtimeClassName: + type: string + schedulerName: + type: string + secrets: + items: + type: string + type: array + securityContext: + type: object + x-kubernetes-preserve-unknown-fields: true + selectAllByDefault: + type: boolean + serviceAccountName: + type: string + serviceScrapeSpec: + required: + - endpoints + type: object + x-kubernetes-preserve-unknown-fields: true + serviceSpec: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + useAsDefault: + type: boolean + required: + - spec + type: object + startupProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + storage: + properties: + disableMountSubPath: + type: boolean + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + volumeClaimTemplate: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + status: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + allocatedResourceStatuses: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + conditions: + items: + properties: + lastProbeTime: + format: date-time + type: string + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentVolumeAttributesClassName: + type: string + modifyVolumeStatus: + properties: + status: + type: string + targetVolumeAttributesClassName: + type: string + required: + - status + type: object + phase: + type: string + type: object + type: object + type: object + templates: + items: + properties: + key: + type: string + name: + default: "" + type: string + required: + - key + type: object + x-kubernetes-map-type: atomic + type: array + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + useVMConfigReloader: + type: boolean + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + webConfig: + properties: + basic_auth_users: + additionalProperties: + type: string + type: object + http_server_config: + properties: + headers: + additionalProperties: + type: string + type: object + http2: + type: boolean + type: object + tls_server_config: + properties: + cert_file: + type: string + cert_secret_ref: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + cipher_suites: + items: + type: string + type: array + client_auth_type: + enum: + - NoClientCert + - RequireAndVerifyClientCert + type: string + client_ca_file: + type: string + client_ca_secret_ref: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + curve_preferences: + items: + type: string + type: array + key_file: + type: string + key_secret_ref: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + max_version: + enum: + - TLS10 + - TLS11 + - TLS12 + - TLS13 + type: string + min_version: + enum: + - TLS10 + - TLS11 + - TLS12 + - TLS13 + type: string + prefer_server_cipher_suites: + type: boolean + type: object + type: object + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.18.0 + name: vmalerts.operator.victoriametrics.com +spec: + group: operator.victoriametrics.com + names: + kind: VMAlert + listKind: VMAlertList + plural: vmalerts + singular: vmalert + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.updateStatus + name: Status + type: string + - jsonPath: .spec.replicaCount + name: ReplicaCount + type: integer + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + affinity: + type: object + x-kubernetes-preserve-unknown-fields: true + configMaps: + items: + type: string + type: array + configReloadAuthKeySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + configReloaderExtraArgs: + additionalProperties: + type: string + type: object + configReloaderImageTag: + type: string + configReloaderResources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + containers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + datasource: + properties: + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearerTokenFile: + type: string + bearerTokenSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + headers: + items: + type: string + type: array + oauth2: + required: + - client_id + - token_url + type: object + x-kubernetes-preserve-unknown-fields: true + tlsConfig: + type: object + x-kubernetes-preserve-unknown-fields: true + url: + type: string + required: + - url + type: object + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + enforcedNamespaceLabel: + type: string + evaluationInterval: + pattern: '[0-9]+(ms|s|m|h)' + type: string + externalLabels: + additionalProperties: + type: string + type: object + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + license: + properties: + forceOffline: + type: boolean + key: + type: string + keyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + reloadInterval: + type: string + type: object + livenessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + logFormat: + enum: + - default + - json + type: string + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + managedMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: + type: string + type: object + notifier: + properties: + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearerTokenFile: + type: string + bearerTokenSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + headers: + items: + type: string + type: array + oauth2: + required: + - client_id + - token_url + type: object + x-kubernetes-preserve-unknown-fields: true + selector: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + properties: + any: + type: boolean + matchNames: + items: + type: string + type: array + type: object + type: object + tlsConfig: + type: object + x-kubernetes-preserve-unknown-fields: true + url: + type: string + type: object + notifierConfigRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + notifiers: + items: + properties: + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearerTokenFile: + type: string + bearerTokenSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + headers: + items: + type: string + type: array + oauth2: + required: + - client_id + - token_url + type: object + x-kubernetes-preserve-unknown-fields: true + selector: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaceSelector: + properties: + any: + type: boolean + matchNames: + items: + type: string + type: array + type: object + type: object + tlsConfig: + type: object + x-kubernetes-preserve-unknown-fields: true + url: + type: string + type: object + type: array + paused: + type: boolean + podDisruptionBudget: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow + type: string + type: object + podMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + port: + type: string + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + readinessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + remoteRead: + properties: + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearerTokenFile: + type: string + bearerTokenSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + headers: + items: + type: string + type: array + lookback: + type: string + oauth2: + required: + - client_id + - token_url + type: object + x-kubernetes-preserve-unknown-fields: true + tlsConfig: + type: object + x-kubernetes-preserve-unknown-fields: true + url: + type: string + required: + - url + type: object + remoteWrite: + properties: + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearerTokenFile: + type: string + bearerTokenSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + concurrency: + format: int32 + type: integer + flushInterval: + pattern: '[0-9]+(ms|s|m|h)' + type: string + headers: + items: + type: string + type: array + maxBatchSize: + format: int32 + type: integer + maxQueueSize: + format: int32 + type: integer + oauth2: + required: + - client_id + - token_url + type: object + x-kubernetes-preserve-unknown-fields: true + tlsConfig: + type: object + x-kubernetes-preserve-unknown-fields: true + url: + type: string + required: + - url + type: object + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdate: + properties: + maxSurge: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + ruleNamespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + rulePath: + items: + type: string + type: array + ruleSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + runtimeClassName: + type: string + schedulerName: + type: string + secrets: + items: + type: string + type: array + securityContext: + type: object + x-kubernetes-preserve-unknown-fields: true + selectAllByDefault: + type: boolean + serviceAccountName: + type: string + serviceScrapeSpec: + required: + - endpoints + type: object + x-kubernetes-preserve-unknown-fields: true + serviceSpec: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + useAsDefault: + type: boolean + required: + - spec + type: object + startupProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + updateStrategy: + enum: + - Recreate + - RollingUpdate + type: string + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + useVMConfigReloader: + type: boolean + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + required: + - datasource + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.18.0 + name: vmanomalies.operator.victoriametrics.com +spec: + group: operator.victoriametrics.com + names: + kind: VMAnomaly + listKind: VMAnomalyList + plural: vmanomalies + singular: vmanomaly + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.shards + name: Shards Count + type: integer + - jsonPath: .status.updateStatus + name: Status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + affinity: + type: object + x-kubernetes-preserve-unknown-fields: true + claimTemplates: + items: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + x-kubernetes-preserve-unknown-fields: true + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + status: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + allocatedResourceStatuses: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + conditions: + items: + properties: + lastProbeTime: + format: date-time + type: string + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentVolumeAttributesClassName: + type: string + modifyVolumeStatus: + properties: + status: + type: string + targetVolumeAttributesClassName: + type: string + required: + - status + type: object + phase: + type: string + type: object + type: object + type: array + configMaps: + items: + type: string + type: array + configRawYaml: + type: string + configSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + containers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + license: + properties: + forceOffline: + type: boolean + key: + type: string + keyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + reloadInterval: + type: string + type: object + livenessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + managedMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + minReadySeconds: + format: int32 + type: integer + monitoring: + properties: + pull: + properties: + port: + type: string + required: + - port + type: object + push: + properties: + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer: + properties: + bearerTokenFile: + type: string + bearerTokenSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + extraLabels: + additionalProperties: + type: string + type: object + healthPath: + type: string + pushFrequency: + type: string + tenantID: + type: string + timeout: + type: string + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + url: + type: string + required: + - url + type: object + type: object + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + persistentVolumeClaimRetentionPolicy: + properties: + whenDeleted: + type: string + whenScaled: + type: string + type: object + podDisruptionBudget: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow + type: string + type: object + podMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + port: + type: string + priorityClassName: + type: string + reader: + properties: + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer: + properties: + bearerTokenFile: + type: string + bearerTokenSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + dataRange: + items: + type: string + type: array + datasourceURL: + type: string + extraFilters: + items: + type: string + type: array + healthPath: + type: string + latencyOffset: + type: string + maxPointsPerQuery: + type: integer + queryFromLastSeenTimestamp: + type: boolean + queryRangePath: + type: string + samplingPeriod: + type: string + tenantID: + type: string + timeout: + type: string + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + tz: + type: string + required: + - datasourceURL + - samplingPeriod + type: object + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + readinessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdateStrategy: + type: string + runtimeClassName: + type: string + schedulerName: + type: string + secrets: + items: + type: string + type: array + securityContext: + type: object + x-kubernetes-preserve-unknown-fields: true + serviceAccountName: + type: string + serviceScrapeSpec: + required: + - endpoints + type: object + x-kubernetes-preserve-unknown-fields: true + shardCount: + type: integer + startupProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + storage: + properties: + disableMountSubPath: + type: boolean + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + volumeClaimTemplate: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + status: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + allocatedResourceStatuses: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + conditions: + items: + properties: + lastProbeTime: + format: date-time + type: string + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentVolumeAttributesClassName: + type: string + modifyVolumeStatus: + properties: + status: + type: string + targetVolumeAttributesClassName: + type: string + required: + - status + type: object + phase: + type: string + type: object + type: object + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + writer: + properties: + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer: + properties: + bearerTokenFile: + type: string + bearerTokenSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + datasourceURL: + type: string + healthPath: + type: string + metricFormat: + properties: + __name__: + type: string + extraLabels: + additionalProperties: + type: string + type: object + for: + type: string + required: + - __name__ + - for + type: object + tenantID: + type: string + timeout: + type: string + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + required: + - datasourceURL + type: object + required: + - reader + - writer + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + shards: + format: int32 + type: integer + updateStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + scale: + labelSelectorPath: .status.selector + specReplicasPath: .spec.shardCount + statusReplicasPath: .status.shards + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.18.0 + name: vmauths.operator.victoriametrics.com +spec: + group: operator.victoriametrics.com + names: + kind: VMAuth + listKind: VMAuthList + plural: vmauths + singular: vmauth + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.updateStatus + name: Status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .spec.replicaCount + name: ReplicaCount + type: integer + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + affinity: + type: object + x-kubernetes-preserve-unknown-fields: true + configMaps: + items: + type: string + type: array + configReloadAuthKeySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + configReloaderExtraArgs: + additionalProperties: + type: string + type: object + configReloaderImageTag: + type: string + configReloaderResources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + configSecret: + type: string + containers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + externalConfig: + properties: + localPath: + type: string + secretRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + hpa: + properties: + behaviour: + properties: + scaleDown: + properties: + policies: + items: + properties: + periodSeconds: + format: int32 + type: integer + type: + type: string + value: + format: int32 + type: integer + required: + - periodSeconds + - type + - value + type: object + type: array + x-kubernetes-list-type: atomic + selectPolicy: + type: string + stabilizationWindowSeconds: + format: int32 + type: integer + tolerance: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + scaleUp: + properties: + policies: + items: + properties: + periodSeconds: + format: int32 + type: integer + type: + type: string + value: + format: int32 + type: integer + required: + - periodSeconds + - type + - value + type: object + type: array + x-kubernetes-list-type: atomic + selectPolicy: + type: string + stabilizationWindowSeconds: + format: int32 + type: integer + tolerance: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + maxReplicas: + format: int32 + type: integer + metrics: + items: + properties: + containerResource: + properties: + container: + type: string + name: + type: string + target: + properties: + averageUtilization: + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + type: string + value: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - container + - name + - target + type: object + external: + properties: + metric: + properties: + name: + type: string + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + required: + - name + type: object + target: + properties: + averageUtilization: + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + type: string + value: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - metric + - target + type: object + object: + properties: + describedObject: + properties: + apiVersion: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + metric: + properties: + name: + type: string + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + required: + - name + type: object + target: + properties: + averageUtilization: + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + type: string + value: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - describedObject + - metric + - target + type: object + pods: + properties: + metric: + properties: + name: + type: string + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + required: + - name + type: object + target: + properties: + averageUtilization: + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + type: string + value: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - metric + - target + type: object + resource: + properties: + name: + type: string + target: + properties: + averageUtilization: + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + type: string + value: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - name + - target + type: object + type: + type: string + required: + - type + type: object + type: array + minReplicas: + format: int32 + type: integer + type: object + httpRoute: + properties: + annotations: + additionalProperties: + type: string + type: object + extraRules: + items: + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + x-kubernetes-preserve-unknown-fields: true + hostnames: + items: + maxLength: 253 + minLength: 1 + pattern: ^(\*\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + type: array + labels: + additionalProperties: + type: string + type: object + name: + type: string + parentRefs: + items: + properties: + group: + default: gateway.networking.k8s.io + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + kind: + default: Gateway + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + type: string + name: + maxLength: 253 + minLength: 1 + type: string + namespace: + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + port: + format: int32 + maximum: 65535 + minimum: 1 + type: integer + sectionName: + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + type: string + required: + - name + type: object + type: array + type: object + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + ingress: + properties: + annotations: + additionalProperties: + type: string + type: object + class_name: + type: string + extraRules: + items: + properties: + host: + type: string + http: + properties: + paths: + items: + properties: + backend: + properties: + resource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + service: + properties: + name: + type: string + port: + properties: + name: + type: string + number: + format: int32 + type: integer + type: object + x-kubernetes-map-type: atomic + required: + - name + type: object + type: object + path: + type: string + pathType: + type: string + required: + - backend + - pathType + type: object + type: array + x-kubernetes-list-type: atomic + required: + - paths + type: object + type: object + type: array + extraTls: + items: + properties: + hosts: + items: + type: string + type: array + x-kubernetes-list-type: atomic + secretName: + type: string + type: object + type: array + host: + type: string + labels: + additionalProperties: + type: string + type: object + name: + type: string + paths: + items: + type: string + type: array + tlsHosts: + items: + type: string + type: array + tlsSecretName: + type: string + type: object + initContainers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + internalListenPort: + type: string + license: + properties: + forceOffline: + type: boolean + key: + type: string + keyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + reloadInterval: + type: string + type: object + livenessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + logFormat: + enum: + - default + - json + type: string + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + managedMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + podDisruptionBudget: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow + type: string + type: object + podMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + port: + type: string + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + readinessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdate: + properties: + maxSurge: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + runtimeClassName: + type: string + schedulerName: + type: string + secrets: + items: + type: string + type: array + securityContext: + type: object + x-kubernetes-preserve-unknown-fields: true + selectAllByDefault: + type: boolean + serviceAccountName: + type: string + serviceScrapeSpec: + required: + - endpoints + type: object + x-kubernetes-preserve-unknown-fields: true + serviceSpec: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + useAsDefault: + type: boolean + required: + - spec + type: object + startupProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + unauthorizedAccessConfig: + x-kubernetes-preserve-unknown-fields: true + unauthorizedUserAccessSpec: + properties: + default_url: + items: + type: string + type: array + discover_backend_ips: + type: boolean + drop_src_path_prefix_parts: + type: integer + dump_request_on_errors: + type: boolean + headers: + items: + type: string + type: array + ip_filters: + properties: + allow_list: + items: + type: string + type: array + deny_list: + items: + type: string + type: array + type: object + load_balancing_policy: + enum: + - least_loaded + - first_available + type: string + max_concurrent_requests: + type: integer + metric_labels: + additionalProperties: + type: string + type: object + response_headers: + items: + type: string + type: array + retry_status_codes: + items: + type: integer + type: array + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + url_map: + items: + properties: + discover_backend_ips: + type: boolean + drop_src_path_prefix_parts: + type: integer + headers: + items: + type: string + type: array + load_balancing_policy: + enum: + - least_loaded + - first_available + type: string + response_headers: + items: + type: string + type: array + retry_status_codes: + items: + type: integer + type: array + src_headers: + items: + type: string + type: array + src_hosts: + items: + type: string + type: array + src_paths: + items: + type: string + type: array + src_query_args: + items: + type: string + type: array + url_prefix: + x-kubernetes-preserve-unknown-fields: true + type: object + type: array + url_prefix: + x-kubernetes-preserve-unknown-fields: true + type: object + updateStrategy: + enum: + - Recreate + - RollingUpdate + type: string + useDefaultResources: + type: boolean + useProxyProtocol: + type: boolean + useStrictSecurity: + type: boolean + useVMConfigReloader: + type: boolean + userNamespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + userSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + x-kubernetes-preserve-unknown-fields: true + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.18.0 + name: vmclusters.operator.victoriametrics.com +spec: + group: operator.victoriametrics.com + names: + kind: VMCluster + listKind: VMClusterList + plural: vmclusters + singular: vmcluster + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .spec.vminsert.replicaCount + name: Insert Count + type: string + - jsonPath: .spec.vmstorage.replicaCount + name: Storage Count + type: string + - jsonPath: .spec.vmselect.replicaCount + name: Select Count + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.updateStatus + name: Status + type: string + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + clusterDomainName: + type: string + clusterVersion: + type: string + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + license: + properties: + forceOffline: + type: boolean + key: + type: string + keyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + reloadInterval: + type: string + type: object + managedMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + paused: + type: boolean + replicationFactor: + format: int32 + type: integer + requestsLoadBalancer: + properties: + disableInsertBalancing: + type: boolean + disableSelectBalancing: + type: boolean + enabled: + type: boolean + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + retentionPeriod: + pattern: ^[0-9]+(h|d|w|y)?$ + type: string + serviceAccountName: + type: string + useStrictSecurity: + type: boolean + vminsert: + properties: + affinity: + type: object + x-kubernetes-preserve-unknown-fields: true + clusterNativeListenPort: + type: string + configMaps: + items: + type: string + type: array + containers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + hpa: + type: object + x-kubernetes-preserve-unknown-fields: true + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + insertPorts: + properties: + graphitePort: + type: string + influxPort: + type: string + openTSDBHTTPPort: + type: string + openTSDBPort: + type: string + type: object + livenessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + logFormat: + enum: + - default + - json + type: string + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + podDisruptionBudget: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow + type: string + type: object + podMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + port: + type: string + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + readinessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdate: + properties: + maxSurge: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + runtimeClassName: + type: string + schedulerName: + type: string + secrets: + items: + type: string + type: array + securityContext: + type: object + x-kubernetes-preserve-unknown-fields: true + serviceScrapeSpec: + required: + - endpoints + type: object + x-kubernetes-preserve-unknown-fields: true + serviceSpec: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + useAsDefault: + type: boolean + required: + - spec + type: object + startupProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + updateStrategy: + enum: + - Recreate + - RollingUpdate + type: string + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + vmselect: + properties: + affinity: + type: object + x-kubernetes-preserve-unknown-fields: true + cacheMountPath: + type: string + claimTemplates: + items: + type: object + type: array + clusterNativeListenPort: + type: string + configMaps: + items: + type: string + type: array + containers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + hpa: + type: object + x-kubernetes-preserve-unknown-fields: true + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + imagePullSecrets: + items: + properties: + name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + livenessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + logFormat: + enum: + - default + - json + type: string + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + persistentVolume: + properties: + disableMountSubPath: + type: boolean + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + volumeClaimTemplate: + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + persistentVolumeClaimRetentionPolicy: + properties: + whenDeleted: + type: string + whenScaled: + type: string + type: object + podDisruptionBudget: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow + type: string + type: object + podMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + port: + type: string + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string required: - - key + - conditionType type: object - x-kubernetes-map-type: atomic - max_version: - description: MaxVersion maximum TLS version that is acceptable. - enum: - - TLS10 - - TLS11 - - TLS12 - - TLS13 - type: string - min_version: - description: MinVersion minimum TLS version that is acceptable. - enum: - - TLS10 - - TLS11 - - TLS12 - - TLS13 - type: string - prefer_server_cipher_suites: - description: |- - PreferServerCipherSuites controls whether the server selects the - client's most preferred ciphersuite - type: boolean - type: object - type: object - type: object - status: - description: |- - Most recent observed status of the VMAlertmanager cluster. - Operator API itself. More info: - https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 + type: array + readinessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + replicaCount: + format: int32 type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdateStrategy: type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown + rollingUpdateStrategyBehavior: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + runtimeClassName: type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 + schedulerName: type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.18.0 - name: vmalerts.operator.victoriametrics.com -spec: - group: operator.victoriametrics.com - names: - kind: VMAlert - listKind: VMAlertList - plural: vmalerts - singular: vmalert - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: Current status of update rollout - jsonPath: .status.updateStatus - name: Status - type: string - - description: The desired replicas number of VMAlerts - jsonPath: .spec.replicaCount - name: ReplicaCount - type: integer - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1beta1 - schema: - openAPIV3Schema: - description: VMAlert executes a list of given alerting or recording rules - against configured address. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VMAlertSpec defines the desired state of VMAlert - properties: - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: - type: string - type: array - configReloadAuthKeySecret: - description: |- - ConfigReloadAuthKeySecret defines optional secret reference authKey for /-/reload API requests. - Given secret reference will be added to the application and vm-config-reloader as volume - available since v0.57.0 version - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - configReloaderExtraArgs: - additionalProperties: - type: string - description: |- - ConfigReloaderExtraArgs that will be passed to VMAuths config-reloader container - for example resyncInterval: "30s" - type: object - configReloaderImageTag: - description: ConfigReloaderImageTag defines image:tag for config-reloader - container - type: string - configReloaderResources: - description: |- - ConfigReloaderResources config-reloader container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. + secrets: + items: + type: string + type: array + securityContext: + type: object + x-kubernetes-preserve-unknown-fields: true + serviceScrapeSpec: + required: + - endpoints + type: object + x-kubernetes-preserve-unknown-fields: true + serviceSpec: properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + useAsDefault: + type: boolean required: - - name + - spec type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to run - within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - datasource: - description: Datasource Victoria Metrics or VMSelect url. Required - parameter. e.g. http://127.0.0.1:8428 - properties: - basicAuth: - description: BasicAuth allow an endpoint to authenticate over - basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object + startupProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + storage: + properties: + disableMountSubPath: + type: boolean + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + volumeClaimTemplate: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + status: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + allocatedResourceStatuses: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + conditions: + items: + properties: + lastProbeTime: + format: date-time + type: string + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentVolumeAttributesClassName: + type: string + modifyVolumeStatus: + properties: + status: + type: string + targetVolumeAttributesClassName: + type: string + required: + - status + type: object + phase: + type: string + type: object + type: object + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: properties: + effect: + type: string key: - description: The key of the secret to select from. Must - be a valid secret key. + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: type: string name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the Secret or its key must - be defined + readOnly: type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string required: - - key + - mountPath + - name type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted + type: array + volumes: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + vmstorage: + properties: + affinity: + type: object + x-kubernetes-preserve-unknown-fields: true + claimTemplates: + items: + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + configMaps: + items: type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object + type: array + containers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + name: + type: string + value: + type: string + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + imagePullSecrets: + items: + properties: name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key type: object x-kubernetes-map-type: atomic - type: object - bearerTokenFile: - description: Path to bearer token file - type: string - bearerTokenSecret: - description: Optional bearer auth token to use for -remoteWrite.url - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. + type: array + initContainers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + livenessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + logFormat: + enum: + - default + - json + type: string + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + maintenanceInsertNodeIDs: + items: + format: int32 + type: integer + type: array + maintenanceSelectNodeIDs: + items: + format: int32 + type: integer + type: array + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - headers: - description: |- - Headers allow configuring custom http headers - Must be in form of semicolon separated header with value - e.g. - headerName:headerValue - vmalert supports it since 1.79.0 version - items: + type: object + paused: + type: boolean + persistentVolumeClaimRetentionPolicy: + properties: + whenDeleted: + type: string + whenScaled: + type: string + type: object + podDisruptionBudget: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow + type: string + type: object + podMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + port: type: string - type: array - oauth2: - description: OAuth2 defines OAuth2 configuration - required: - - client_id - - token_url - type: object - x-kubernetes-preserve-unknown-fields: true - tlsConfig: - description: TLSConfig specifies TLSConfig configuration parameters. - type: object - x-kubernetes-preserve-unknown-fields: true - url: - description: Victoria Metrics or VMSelect url. Required parameter. - E.g. http://127.0.0.1:8428 - type: string - required: - - url - type: object - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: - x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + readinessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdateStrategy: type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. + rollingUpdateStrategyBehavior: properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this DNS resolver option's value. - type: string + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: + runtimeClassName: type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - enforcedNamespaceLabel: - description: |- - EnforcedNamespaceLabel enforces adding a namespace label of origin for each alert - and metric that is user created. The label value will always be the namespace of the object that is - being created. - type: string - evaluationInterval: - description: EvaluationInterval defines how often to evaluate rules - by default - pattern: '[0-9]+(ms|s|m|h)' - type: string - externalLabels: - additionalProperties: - type: string - description: 'ExternalLabels in the form ''name: value'' to add to - all generated recording rules and alerts.' - type: object - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application container - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". + schedulerName: type: string - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of ConfigMaps - or Secrets - properties: - configMapRef: - description: The ConfigMap to select from + secrets: + items: + type: string + type: array + securityContext: + type: object + x-kubernetes-preserve-unknown-fields: true + serviceScrapeSpec: + required: + - endpoints + type: object + x-kubernetes-preserve-unknown-fields: true + serviceSpec: properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap must be defined + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + useAsDefault: type: boolean + required: + - spec type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. + startupProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + storage: + properties: + disableMountSubPath: + type: boolean + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + volumeClaimTemplate: + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + storageDataPath: type: string - secretRef: - description: The Secret to select from + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + vmBackup: properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + acceptEULA: + type: boolean + concurrency: + format: int32 + type: integer + credentialsSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + customS3Endpoint: type: string - optional: - description: Specify whether the Secret must be defined + destination: + type: string + destinationDisableSuffixAdd: + type: boolean + disableDaily: + type: boolean + disableHourly: + type: boolean + disableMonthly: type: boolean + disableWeekly: + type: boolean + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + logFormat: + enum: + - default + - json + type: string + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + port: + type: string + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restore: + properties: + onStart: + properties: + enabled: + type: boolean + type: object + type: object + snapshotCreateURL: + type: string + snapshotDeleteURL: + type: string + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array type: object - x-kubernetes-map-type: atomic - type: object - type: array - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the node - network namespace - type: boolean - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image + it's repository - if needed - type: string - tag: - description: Tag contains desired docker image version - type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + vmInsertPort: type: string - type: object - x-kubernetes-map-type: atomic - type: array - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to run - within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - license: - description: |- - License allows to configure license key to be used for enterprise features. - Using license key is supported starting from VictoriaMetrics v1.94.0. - See [here](https://docs.victoriametrics.com/victoriametrics/enterprise/) - properties: - forceOffline: - description: Enforce offline verification of the license key. - type: boolean - key: - description: |- - Enterprise license key. This flag is available only in [VictoriaMetrics enterprise](https://docs.victoriametrics.com/victoriametrics/enterprise/). - To request a trial license, [go to](https://victoriametrics.com/products/enterprise/trial) - type: string - keyRef: - description: KeyRef is reference to secret with license key for - enterprise features. - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - reloadInterval: - description: Interval to be used for checking for license key - changes. Note that this is only applicable when using KeyRef. - type: string - type: object - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logFormat: - description: |- - LogFormat for VMAlert to be configured with. - default or json - enum: - - default - - json - type: string - logLevel: - description: LogLevel for VMAlert to be configured with. - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - managedMetadata: - description: |- - ManagedMetadata defines metadata that will be added to the all objects - created by operator for the given CustomResource - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: + vmSelectPort: type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - type: object - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - nodeSelector: - additionalProperties: - type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - notifier: - description: |- - Notifier prometheus alertmanager endpoint spec. Required at least one of notifier or notifiers when there are alerting rules. e.g. http://127.0.0.1:9093 - If specified both notifier and notifiers, notifier will be added as last element to notifiers. - only one of notifier options could be chosen: notifierConfigRef or notifiers + notifier - properties: - basicAuth: - description: BasicAuth allow an endpoint to authenticate over - basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object + volumeMounts: + items: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + mountPath: + type: string + mountPropagation: type: string name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the Secret or its key must - be defined + readOnly: type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string required: - - key + - mountPath + - name type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted + type: array + volumes: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.18.0 + name: vmdistributedclusters.operator.victoriametrics.com +spec: + group: operator.victoriametrics.com + names: + kind: VMDistributedCluster + listKind: VMDistributedClusterList + plural: vmdistributedclusters + singular: vmdistributedcluster + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.updateStatus + name: Status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + paused: + type: boolean + readyDeadline: + type: string + vmAgentFlushDeadline: + type: string + vmagent: + properties: + name: + type: string + spec: + properties: + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + arbitraryFSAccessThroughSMs: + properties: + deny: + type: boolean + type: object + claimTemplates: + items: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + status: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + allocatedResourceStatuses: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + conditions: + items: + properties: + lastProbeTime: + format: date-time + type: string + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentVolumeAttributesClassName: + type: string + modifyVolumeStatus: + properties: + status: + type: string + targetVolumeAttributesClassName: + type: string + required: + - status + type: object + phase: + type: string + type: object + type: object + type: array + configMaps: + items: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: array + configReloadAuthKeySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + configReloaderExtraArgs: + additionalProperties: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearerTokenFile: - description: Path to bearer token file - type: string - bearerTokenSecret: - description: Optional bearer auth token to use for -remoteWrite.url - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - headers: - description: |- - Headers allow configuring custom http headers - Must be in form of semicolon separated header with value - e.g. - headerName:headerValue - vmalert supports it since 1.79.0 version - items: - type: string - type: array - oauth2: - description: OAuth2 defines OAuth2 configuration - required: - - client_id - - token_url - type: object - x-kubernetes-preserve-unknown-fields: true - selector: - description: |- - Selector allows service discovery for alertmanager - in this case all matched vmalertmanager replicas will be added into vmalert notifier.url - as statefulset pod.fqdn - properties: - labelSelector: - description: |- - A label selector is a label query over a set of resources. The result of matchLabels and - matchExpressions are ANDed. An empty label selector matches all objects. A null - label selector matches no objects. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: + type: object + configReloaderImageTag: + type: string + configReloaderResources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + containers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + stopSignal: type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaceSelector: - description: |- - NamespaceSelector is a selector for selecting either all namespaces or a - list of namespaces. - properties: - any: - description: |- - Boolean describing whether all namespaces are selected in contrast to a - list restricting them. - type: boolean - matchNames: - description: List of namespace names. - items: - type: string - type: array - type: object - type: object - tlsConfig: - description: TLSConfig specifies TLSConfig configuration parameters. - type: object - x-kubernetes-preserve-unknown-fields: true - url: - description: AlertManager url. E.g. http://127.0.0.1:9093 - type: string - type: object - notifierConfigRef: - description: |- - NotifierConfigRef reference for secret with notifier configuration for vmalert - only one of notifier options could be chosen: notifierConfigRef or notifiers + notifier - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - notifiers: - description: |- - Notifiers prometheus alertmanager endpoints. Required at least one of notifier or notifiers when there are alerting rules. e.g. http://127.0.0.1:9093 - If specified both notifier and notifiers, notifier will be added as last element to notifiers. - only one of notifier options could be chosen: notifierConfigRef or notifiers + notifier - items: - description: VMAlertNotifierSpec defines the notifier url for sending - information about alerts - properties: - basicAuth: - description: BasicAuth allow an endpoint to authenticate over - basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearerTokenFile: - description: Path to bearer token file - type: string - bearerTokenSecret: - description: Optional bearer auth token to use for -remoteWrite.url - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + restartPolicyRules: + items: + properties: + action: + type: string + exitCodes: + properties: + operator: + type: string + values: + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set + required: + - operator + type: object + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + daemonSetMode: type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - headers: - description: |- - Headers allow configuring custom http headers - Must be in form of semicolon separated header with value - e.g. - headerName:headerValue - vmalert supports it since 1.79.0 version - items: - type: string - type: array - oauth2: - description: OAuth2 defines OAuth2 configuration - required: - - client_id - - token_url - type: object - x-kubernetes-preserve-unknown-fields: true - selector: - description: |- - Selector allows service discovery for alertmanager - in this case all matched vmalertmanager replicas will be added into vmalert notifier.url - as statefulset pod.fqdn - properties: - labelSelector: - description: |- - A label selector is a label query over a set of resources. The result of matchLabels and - matchExpressions are ANDed. An empty label selector matches all objects. A null - label selector matches no objects. + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. properties: - key: - description: key is the label key that the selector - applies to. + name: type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. + value: type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator type: object type: array x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - namespaceSelector: - description: |- - NamespaceSelector is a selector for selecting either all namespaces or a - list of namespaces. - properties: - any: - description: |- - Boolean describing whether all namespaces are selected in contrast to a - list restricting them. - type: boolean - matchNames: - description: List of namespace names. + searches: items: type: string type: array + x-kubernetes-list-type: atomic type: object - type: object - tlsConfig: - description: TLSConfig specifies TLSConfig configuration parameters. - type: object - x-kubernetes-preserve-unknown-fields: true - url: - description: AlertManager url. E.g. http://127.0.0.1:9093 - type: string - type: object - type: array - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - podDisruptionBudget: - description: PodDisruptionBudget created by operator - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at most "maxUnavailable" pods selected by - "selector" are unavailable after the eviction, i.e. even in absence of - the evicted pod. For example, one can prevent all voluntary evictions - by specifying 0. This is a mutually exclusive setting with "minAvailable". - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at least "minAvailable" pods selected by - "selector" will still be available after the eviction, i.e. even in the - absence of the evicted pod. So for example you can prevent all voluntary - evictions by specifying "100%". - x-kubernetes-int-or-string: true - selectorLabels: - additionalProperties: - type: string - description: |- - replaces default labels selector generated by operator - it's useful when you need to create custom budget - type: object - unhealthyPodEvictionPolicy: - description: |- - UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods - - Valid policies are IfHealthyBudget and AlwaysAllow. - If no policy is specified, the default behavior will be used, - which corresponds to the IfHealthyBudget policy. - Available from operator v0.64.0 - enum: - - IfHealthyBudget - - AlwaysAllow - type: string - type: object - podMetadata: - description: PodMetadata configures Labels and Annotations which are - propagated to the VMAlert pods. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - port: - description: Port listen address - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods - type: string - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod condition - properties: - conditionType: - description: ConditionType refers to a condition in the pod's - condition list with matching type. - type: string - required: - - conditionType - type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - remoteRead: - description: |- - RemoteRead Optional URL to read vmalert state (persisted via RemoteWrite) - This configuration only makes sense if alerts state has been successfully - persisted (via RemoteWrite) before. - see -remoteRead.url docs in vmalerts for details. - E.g. http://127.0.0.1:8428 - properties: - basicAuth: - description: BasicAuth allow an endpoint to authenticate over - basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearerTokenFile: - description: Path to bearer token file - type: string - bearerTokenSecret: - description: Optional bearer auth token to use for -remoteWrite.url - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - headers: - description: |- - Headers allow configuring custom http headers - Must be in form of semicolon separated header with value - e.g. - headerName:headerValue - vmalert supports it since 1.79.0 version - items: - type: string - type: array - lookback: - description: |- - Lookback defines how far to look into past for alerts timeseries. For example, if lookback=1h then range from now() to now()-1h will be scanned. (default 1h0m0s) - Applied only to RemoteReadSpec - type: string - oauth2: - description: OAuth2 defines OAuth2 configuration - required: - - client_id - - token_url - type: object - x-kubernetes-preserve-unknown-fields: true - tlsConfig: - description: TLSConfig specifies TLSConfig configuration parameters. - type: object - x-kubernetes-preserve-unknown-fields: true - url: - description: URL of the endpoint to send samples to. - type: string - required: - - url - type: object - remoteWrite: - description: |- - RemoteWrite Optional URL to remote-write compatible storage to persist - vmalert state and rule results to. - Rule results will be persisted according to each rule. - Alerts state will be persisted in the form of time series named ALERTS and ALERTS_FOR_STATE - see -remoteWrite.url docs in vmalerts for details. - E.g. http://127.0.0.1:8428 - properties: - basicAuth: - description: BasicAuth allow an endpoint to authenticate over - basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearerTokenFile: - description: Path to bearer token file - type: string - bearerTokenSecret: - description: Optional bearer auth token to use for -remoteWrite.url - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - concurrency: - description: Defines number of readers that concurrently write - into remote storage (default 1) - format: int32 - type: integer - flushInterval: - description: Defines interval of flushes to remote write endpoint - (default 5s) - pattern: '[0-9]+(ms|s|m|h)' - type: string - headers: - description: |- - Headers allow configuring custom http headers - Must be in form of semicolon separated header with value - e.g. - headerName:headerValue - vmalert supports it since 1.79.0 version - items: - type: string - type: array - maxBatchSize: - description: Defines defines max number of timeseries to be flushed - at once (default 1000) - format: int32 - type: integer - maxQueueSize: - description: Defines the max number of pending datapoints to remote - write endpoint (default 100000) - format: int32 - type: integer - oauth2: - description: OAuth2 defines OAuth2 configuration - required: - - client_id - - token_url - type: object - x-kubernetes-preserve-unknown-fields: true - tlsConfig: - description: TLSConfig specifies TLSConfig configuration parameters. - type: object - x-kubernetes-preserve-unknown-fields: true - url: - description: URL of the endpoint to send samples to. - type: string - required: - - url - type: object - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. + dnsPolicy: type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. + enforcedNamespaceLabel: type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - rollingUpdate: - description: RollingUpdate - overrides deployment update params. - properties: - maxSurge: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of pods that can be scheduled above the desired number of - pods. - Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - This can not be 0 if MaxUnavailable is 0. - Absolute number is calculated from percentage by rounding up. - Defaults to 25%. - Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when - the rolling update starts, such that the total number of old and new pods do not exceed - 130% of desired pods. Once old pods have been killed, - new ReplicaSet can be scaled up further, ensuring that total number of pods running - at any time during the update is at most 130% of desired pods. - x-kubernetes-int-or-string: true - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of pods that can be unavailable during the update. - Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - Absolute number is calculated from percentage by rounding down. - This can not be 0 if MaxSurge is 0. - Defaults to 25%. - Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods - immediately when the rolling update starts. Once new pods are ready, old ReplicaSet - can be scaled down further, followed by scaling up the new ReplicaSet, ensuring - that the total number of pods available at all times during the update is at - least 70% of desired pods. - x-kubernetes-int-or-string: true - type: object - ruleNamespaceSelector: - description: |- - RuleNamespaceSelector to be selected for VMRules discovery. - Works in combination with Selector. - If both nil - behaviour controlled by selectAllByDefault - NamespaceSelector nil - only objects at VMAlert namespace. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + extraEnvsFrom: items: - type: string + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - rulePath: - description: |- - RulePath to the file with alert rules. - Supports patterns. Flag can be specified multiple times. - Examples: - -rule /path/to/file. Path to a single file with alerting rules - -rule dir/*.yaml -rule /*.yaml. Relative path to all .yaml files in folder, - absolute path to all .yaml files in root. - by default operator adds /etc/vmalert/configs/base/vmalert.yaml - items: - type: string - type: array - ruleSelector: - description: |- - RuleSelector selector to select which VMRules to mount for loading alerting - rules from. - Works in combination with NamespaceSelector. - If both nil - behaviour controlled by selectAllByDefault - NamespaceSelector nil - only objects at VMAlert namespace. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. + host_aliases: items: - type: string + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: - type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - selectAllByDefault: - description: |- - SelectAllByDefault changes default behavior for empty CRD selectors, such RuleSelector. - with selectAllByDefault: true and empty serviceScrapeSelector and RuleNamespaceSelector - Operator selects all exist serviceScrapes - with selectAllByDefault: false - selects nothing - type: boolean - serviceAccountName: - description: ServiceAccountName is the name of the ServiceAccount - to use to run the pods - type: string - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vmalert VMServiceScrape - spec - required: - - endpoints - type: object - x-kubernetes-preserve-unknown-fields: true - serviceSpec: - description: ServiceSpec that will be added to vmalert service spec - properties: - metadata: - description: EmbeddedObjectMetadata defines objectMeta for additional - service. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - spec: - description: |- - ServiceSpec describes the attributes that a user creates on a service. - More info: https://kubernetes.io/docs/concepts/services-networking/service/ - type: object - x-kubernetes-preserve-unknown-fields: true - useAsDefault: - description: |- - UseAsDefault applies changes from given service definition to the main object Service - Changing from headless service to clusterIP or loadbalancer may break cross-component communication - type: boolean - required: - - spec - type: object - startupProbe: - description: StartupProbe that will be added to CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container graceful - termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread matching - pods among the given topology. - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - updateStrategy: - description: UpdateStrategy - overrides default update strategy. - enum: - - Recreate - - RollingUpdate - type: string - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - useVMConfigReloader: - description: |- - UseVMConfigReloader replaces prometheus-like config-reloader - with vm one. It uses secrets watch instead of file watch - which greatly increases speed of config updates - type: boolean - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that may - be accessed by any container in the pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - required: - - datasource - type: object - status: - description: VMAlertStatus defines the observed state of VMAlert - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 - type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.18.0 - name: vmanomalies.operator.victoriametrics.com -spec: - group: operator.victoriametrics.com - names: - kind: VMAnomaly - listKind: VMAnomalyList - plural: vmanomalies - singular: vmanomaly - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: current number of shards - jsonPath: .status.shards - name: Shards Count - type: integer - - description: Current status of update rollout - jsonPath: .status.updateStatus - name: Status - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1 - schema: - openAPIV3Schema: - description: VMAnomaly is the Schema for the vmanomalies API. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VMAnomalySpec defines the desired state of VMAnomaly. - properties: - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - claimTemplates: - description: ClaimTemplates allows adding additional VolumeClaimTemplates - for VMAnomaly - items: - description: PersistentVolumeClaim is a user's request for and claim - to a persistent volume - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - description: |- - Standard object's metadata. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata - type: object - x-kubernetes-preserve-unknown-fields: true - spec: - description: |- - spec defines the desired characteristics of a volume requested by a pod author. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 + hostAliases: items: - type: string + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + ignoreNamespaceSelectors: + type: boolean + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + stopSignal: + type: string + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + restartPolicyRules: + items: + properties: + action: + type: string + exitCodes: + properties: + operator: + type: string + values: + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set + required: + - operator + type: object + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object type: array - x-kubernetes-list-type: atomic - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. + license: + properties: + forceOffline: + type: boolean + key: + type: string + keyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + reloadInterval: + type: string + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + logFormat: + enum: + - default + - json + type: string + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + managedMetadata: properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: + type: string + type: object + overrideHonorLabels: + type: boolean + overrideHonorTimestamps: + type: boolean + paused: + type: boolean + persistentVolumeClaimRetentionPolicy: properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced + whenDeleted: type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + whenScaled: type: string - required: - - kind - - name type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources + podDisruptionBudget: properties: - limits: - additionalProperties: - anyOf: + maxUnavailable: + anyOf: - type: integer - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: + x-kubernetes-int-or-string: true + minAvailable: + anyOf: - type: integer - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow + type: string type: object - selector: - description: selector is a label query over volumes to consider - for binding. + podMetadata: properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: + annotations: additionalProperties: type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string or nil value indicates that no - VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, - this field can be reset to its previous value (including nil) to cancel the modification. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the - PersistentVolume backing this claim. - type: string - type: object - status: - description: |- - status represents the current information/status of a persistent volume claim. - Read-only. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the actual access modes the volume backing the PVC has. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - x-kubernetes-list-type: atomic - allocatedResourceStatuses: - additionalProperties: - description: |- - When a controller receives persistentvolume claim update with ClaimResourceStatus for a resource - that it does not recognizes, then it should ignore that update and let other controllers - handle it. - type: string - description: "allocatedResourceStatuses stores status of - resource being resized for the given PVC.\nKey names follow - standard Kubernetes label syntax. Valid values are either:\n\t* - Un-prefixed keys:\n\t\t- storage - the capacity of the - volume.\n\t* Custom resources must use implementation-defined - prefixed names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or have kubernetes.io - prefix are considered\nreserved and hence may not be used.\n\nClaimResourceStatus - can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState - set when resize controller starts resizing the volume - in control-plane.\n\t- ControllerResizeFailed:\n\t\tState - set when resize has failed in resize controller with a - terminal error.\n\t- NodeResizePending:\n\t\tState set - when resize controller has finished resizing the volume - but further resizing of\n\t\tvolume is needed on the node.\n\t- - NodeResizeInProgress:\n\t\tState set when kubelet starts - resizing the volume.\n\t- NodeResizeFailed:\n\t\tState - set when resizing has failed in kubelet with a terminal - error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor - example: if expanding a PVC for more capacity - this field - can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeFailed\"\nWhen this field is not set, it - means that no resize operation is in progress for the - given PVC.\n\nA controller that receives PVC update with - previously unknown resourceName or ClaimResourceStatus\nshould - ignore the update for the purpose it was designed. For - example - a controller that\nonly is responsible for resizing - capacity of the volume, should ignore PVC updates that - change other valid\nresources associated with PVC.\n\nThis - is an alpha field and requires enabling RecoverVolumeExpansionFailure - feature." - type: object - x-kubernetes-map-type: granular - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: "allocatedResources tracks the resources allocated - to a PVC including its capacity.\nKey names follow standard - Kubernetes label syntax. Valid values are either:\n\t* - Un-prefixed keys:\n\t\t- storage - the capacity of the - volume.\n\t* Custom resources must use implementation-defined - prefixed names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or have kubernetes.io - prefix are considered\nreserved and hence may not be used.\n\nCapacity - reported here may be larger than the actual capacity when - a volume expansion operation\nis requested.\nFor storage - quota, the larger value from allocatedResources and PVC.spec.resources - is used.\nIf allocatedResources is not set, PVC.spec.resources - alone is used for quota calculation.\nIf a volume expansion - capacity request is lowered, allocatedResources is only\nlowered - if there are no expansion operations in progress and if - the actual volume capacity\nis equal or lower than the - requested capacity.\n\nA controller that receives PVC - update with previously unknown resourceName\nshould ignore - the update for the purpose it was designed. For example - - a controller that\nonly is responsible for resizing - capacity of the volume, should ignore PVC updates that - change other valid\nresources associated with PVC.\n\nThis - is an alpha field and requires enabling RecoverVolumeExpansionFailure - feature." - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: capacity represents the actual resources of - the underlying volume. - type: object - conditions: - description: |- - conditions is the current Condition of persistent volume claim. If underlying persistent volume is being - resized then the Condition will be set to 'Resizing'. - items: - description: PersistentVolumeClaimCondition contains details - about state of pvc - properties: - lastProbeTime: - description: lastProbeTime is the time we probed the - condition. - format: date-time - type: string - lastTransitionTime: - description: lastTransitionTime is the time the condition - transitioned from one status to another. - format: date-time - type: string - message: - description: message is the human-readable message - indicating details about last transition. - type: string - reason: - description: |- - reason is a unique, this should be a short, machine understandable string that gives the reason - for condition's last transition. If it reports "Resizing" that means the underlying - persistent volume is being resized. - type: string - status: - description: |- - Status is the status of the condition. - Can be True, False, Unknown. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required - type: string - type: - description: |- - Type is the type of the condition. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about + labels: + additionalProperties: type: string - required: - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - currentVolumeAttributesClassName: - description: |- - currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. - When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim - type: string - modifyVolumeStatus: - description: |- - ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. - When this is unset, there is no ModifyVolume operation being attempted. - properties: - status: - description: "status is the status of the ControllerModifyVolume - operation. It can be in any of following states:\n - - Pending\n Pending indicates that the PersistentVolumeClaim - cannot be modified due to unmet requirements, such - as\n the specified VolumeAttributesClass not existing.\n - - InProgress\n InProgress indicates that the volume - is being modified.\n - Infeasible\n Infeasible indicates - that the request has been rejected as invalid by the - CSI driver. To\n\t resolve the error, a valid VolumeAttributesClass - needs to be specified.\nNote: New statuses can be - added in the future. Consumers should check for unknown - statuses and fail appropriately." - type: string - targetVolumeAttributesClassName: - description: targetVolumeAttributesClassName is the - name of the VolumeAttributesClass the PVC currently - being reconciled + type: object + name: type: string - required: - - status type: object - phase: - description: phase represents the current phase of PersistentVolumeClaim. - type: string - type: object - type: object - type: array - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: - type: string - type: array - configRawYaml: - description: |- - ConfigRawYaml - raw configuration for anomaly, - it helps it to start without secret. - priority -> hardcoded ConfigRaw -> ConfigRaw, provided by user -> ConfigSecret. - type: string - configSecret: - description: |- - ConfigSecret is the name of a Kubernetes Secret in the same namespace as the - VMAnomaly object, which contains configuration for this VMAnomaly, - configuration must be inside secret key: anomaly.yaml. - It must be created by user. - instance. Defaults to 'vmanomaly-' - The secret is mounted into /etc/anomaly/config. - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to run - within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: - x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. - properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this DNS resolver option's value. - type: string - type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application container - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of ConfigMaps - or Secrets - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + port: type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + priorityClassName: type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the node - network namespace - type: boolean - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image + it's repository - if needed - type: string - tag: - description: Tag contains desired docker image version - type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - type: array - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to run - within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - license: - description: |- - License allows to configure license key to be used for enterprise features. - Using license key is supported starting from VictoriaMetrics v1.94.0. - See [here](https://docs.victoriametrics.com/victoriametrics/enterprise/) - properties: - forceOffline: - description: Enforce offline verification of the license key. - type: boolean - key: - description: |- - Enterprise license key. This flag is available only in [VictoriaMetrics enterprise](https://docs.victoriametrics.com/victoriametrics/enterprise/). - To request a trial license, [go to](https://victoriametrics.com/products/enterprise/trial) - type: string - keyRef: - description: KeyRef is reference to secret with license key for - enterprise features. - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - reloadInterval: - description: Interval to be used for checking for license key - changes. Note that this is only applicable when using KeyRef. - type: string - type: object - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logLevel: - description: |- - LogLevel for VMAnomaly to be configured with. - INFO, WARN, ERROR, FATAL, PANIC - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - managedMetadata: - description: |- - ManagedMetadata defines metadata that will be added to the all objects - created by operator for the given CustomResource - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - type: object - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - monitoring: - description: |- - Monitoring configures how expose anomaly metrics - See https://docs.victoriametrics.com/anomaly-detection/components/monitoring/ - properties: - pull: - description: |- - VMAnomalyMonitoringPullSpec defines pull monitoring configuration - which is enabled by default and served at POD_IP:8490/metrics - properties: - port: - description: Port defines a port for metrics scrape - type: string - required: - - port - type: object - push: - description: |- - VMAnomalyMonitoringPushSpec defines metrics push configuration - - VMAnomaly uses prometheus text exposition format - properties: - basicAuth: - description: Basic auth defines basic authorization configuration - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearer: - description: 'BearerAuth defines authorization with Authorization: - Bearer header' - properties: - bearerTokenFile: - description: Path to bearer token file - type: string - bearerTokenSecret: - description: Optional bearer auth token to use for -remoteWrite.url + readinessGates: + items: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean + conditionType: + type: string required: - - key + - conditionType type: object - x-kubernetes-map-type: atomic - type: object - extraLabels: - additionalProperties: - type: string - description: ExtraLabels defines a set of labels to attach - to the pushed metrics - type: object - healthPath: - description: HealthPath defines absolute or relative URL address - where to check availability of the remote webserver - type: string - pushFrequency: - description: PushFrequency defines push interval - type: string - tenantID: - description: TenantID defines for VictoriaMetrics Cluster - version only, tenants are identified by accountID, accountID:projectID - or multitenant. - type: string - timeout: - description: Timeout for the requests, passed as a string - type: string - tlsConfig: - description: TLSConfig defines tls connection configuration - properties: - ca: - description: Struct containing the CA cert to use for - the targets. + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + remoteWrite: + items: properties: - configMap: - description: ConfigMap containing data to use for - the targets. + aws: + properties: + ec2Endpoint: + type: string + region: + type: string + roleARN: + type: string + service: + type: string + stsEndpoint: + type: string + useSigv4: + type: boolean + type: object + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearerTokenSecret: properties: key: - description: The key to select. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the ConfigMap or - its key must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the - targets. + forceVMProto: + type: boolean + headers: + items: + type: string + type: array + maxDiskUsage: + x-kubernetes-preserve-unknown-fields: true + oauth2: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + client_secret_file: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + endpoint_params: + additionalProperties: + type: string + type: object + proxy_url: + type: string + scopes: + items: + type: string + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url + type: object + proxyURL: + type: string + sendTimeout: + pattern: '[0-9]+(ms|s|m|h)' + type: string + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key type: object - x-kubernetes-map-type: atomic + url: + type: string type: object - caFile: - description: Path to the CA cert in the container to use - for the targets. - type: string - cert: - description: Struct containing the client cert file for - the targets. - properties: - configMap: - description: ConfigMap containing data to use for - the targets. + type: array + remoteWriteSettings: + properties: + flushInterval: + pattern: '[0-9]+(ms|s|m|h)' + type: string + label: + additionalProperties: + type: string + type: object + maxBlockSize: + format: int32 + type: integer + maxDiskUsagePerURL: + x-kubernetes-preserve-unknown-fields: true + queues: + format: int32 + type: integer + showURL: + type: boolean + tmpDataPath: + type: string + useMultiTenantMode: + type: boolean + type: object + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: properties: - key: - description: The key to select. - type: string name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the - targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + request: type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean required: - - key + - name type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the container - for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container - for the targets. - type: string - keySecret: - description: Secret containing the client key file for - the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string - type: object - url: - description: defines target url for push requests - type: string - required: - - url - type: object - type: object - nodeSelector: - additionalProperties: - type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - persistentVolumeClaimRetentionPolicy: - description: PersistentVolumeClaimRetentionPolicy allows configuration - of PVC retention policy - properties: - whenDeleted: - description: |- - WhenDeleted specifies what happens to PVCs created from StatefulSet - VolumeClaimTemplates when the StatefulSet is deleted. The default policy - of `Retain` causes PVCs to not be affected by StatefulSet deletion. The - `Delete` policy causes those PVCs to be deleted. - type: string - whenScaled: - description: |- - WhenScaled specifies what happens to PVCs created from StatefulSet - VolumeClaimTemplates when the StatefulSet is scaled down. The default - policy of `Retain` causes PVCs to not be affected by a scaledown. The - `Delete` policy causes the associated PVCs for any excess pods above - the replica count to be deleted. - type: string - type: object - podDisruptionBudget: - description: PodDisruptionBudget created by operator - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at most "maxUnavailable" pods selected by - "selector" are unavailable after the eviction, i.e. even in absence of - the evicted pod. For example, one can prevent all voluntary evictions - by specifying 0. This is a mutually exclusive setting with "minAvailable". - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at least "minAvailable" pods selected by - "selector" will still be available after the eviction, i.e. even in the - absence of the evicted pod. So for example you can prevent all voluntary - evictions by specifying "100%". - x-kubernetes-int-or-string: true - selectorLabels: - additionalProperties: - type: string - description: |- - replaces default labels selector generated by operator - it's useful when you need to create custom budget - type: object - unhealthyPodEvictionPolicy: - description: |- - UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods - - Valid policies are IfHealthyBudget and AlwaysAllow. - If no policy is specified, the default behavior will be used, - which corresponds to the IfHealthyBudget policy. - Available from operator v0.64.0 - enum: - - IfHealthyBudget - - AlwaysAllow - type: string - type: object - podMetadata: - description: PodMetadata configures Labels and Annotations which are - propagated to the vmanomaly pods. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - port: - description: Port listen address - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods - type: string - reader: - description: |- - Metrics source for VMAnomaly - See https://docs.victoriametrics.com/anomaly-detection/components/reader/ - properties: - basicAuth: - description: Basic auth defines basic authorization configuration - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearer: - description: 'BearerAuth defines authorization with Authorization: - Bearer header' - properties: - bearerTokenFile: - description: Path to bearer token file - type: string - bearerTokenSecret: - description: Optional bearer auth token to use for -remoteWrite.url - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - dataRange: - description: Optional argumentallows defining valid data ranges - for input of all the queries in queries - items: - type: string - type: array - datasourceURL: - description: |- - DatasourceURL address - datasource must serve /api/v1/query and /api/v1/query_range APIs - type: string - extraFilters: - description: List of strings with series selector. - items: - type: string - type: array - healthPath: - description: HealthPath defines absolute or relative URL address - where to check availability of the remote webserver - type: string - latencyOffset: - description: It allows overriding the default -search.latencyOffsetflag - of VictoriaMetrics - type: string - maxPointsPerQuery: - description: Optional argoverrides how search.maxPointsPerTimeseries - flagimpacts vmanomaly on splitting long fitWindow queries into - smaller sub-intervals - type: integer - queryFromLastSeenTimestamp: - description: If True, then query will be performed from the last - seen timestamp for a given series. - type: boolean - queryRangePath: - description: Performs PromQL/MetricsQL range query - type: string - samplingPeriod: - description: Frequency of the points returned - type: string - tenantID: - description: TenantID defines for VictoriaMetrics Cluster version - only, tenants are identified by accountID, accountID:projectID - or multitenant. - type: string - timeout: - description: Timeout for the requests, passed as a string - type: string - tlsConfig: - description: TLSConfig defines tls connection configuration - properties: - ca: - description: Struct containing the CA cert to use for the - targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container to use for - the targets. - type: string - cert: - description: Struct containing the client cert file for the - targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the container - for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container - for the targets. - type: string - keySecret: - description: Secret containing the client key file for the - targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string - type: object - tz: - description: Optional argumentspecifies the IANA timezone to account - for local shifts, like DST, in models sensitive to seasonal - patterns - type: string - required: - - datasourceURL - - samplingPeriod - type: object - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod condition - properties: - conditionType: - description: ConditionType refers to a condition in the pod's - condition list with matching type. - type: string - required: - - conditionType - type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdate: + properties: + maxSurge: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + runtimeClassName: type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. + schedulerName: type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - rollingUpdateStrategy: - description: |- - RollingUpdateStrategy allows configuration for strategyType - set it to RollingUpdate for disabling operator statefulSet rollingUpdate - type: string - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: - type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - serviceAccountName: - description: ServiceAccountName is the name of the ServiceAccount - to use to run the pods - type: string - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vmanomaly VMPodScrape - spec - required: - - endpoints - type: object - x-kubernetes-preserve-unknown-fields: true - shardCount: - description: |- - ShardCount - numbers of shards of VMAnomaly - in this case operator will use 1 sts per shard with - replicas count according to spec.replicas. - type: integer - startupProbe: - description: StartupProbe that will be added to CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - storage: - description: Storage configures storage for StatefulSet - properties: - disableMountSubPath: - description: |- - Deprecated: subPath usage will be disabled by default in a future release, this option will become unnecessary. - DisableMountSubPath allows to remove any subPath usage in volume mounts. - type: boolean - emptyDir: - description: |- - EmptyDirVolumeSource to be used by the Prometheus StatefulSets. If specified, used in place of any volumeClaimTemplate. More - info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir - properties: - medium: - description: |- - medium represents what type of storage medium should back this directory. - The default is "" which means to use the node's default medium. - Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: |- - sizeLimit is the total amount of local storage required for this EmptyDir volume. - The size limit is also applicable for memory medium. - The maximum usage on memory medium EmptyDir would be the minimum value between - the SizeLimit specified here and the sum of memory limits of all containers in a pod. - The default is nil which means that the limit is undefined. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - volumeClaimTemplate: - description: A PVC spec to be used by the StatefulSets/Deployments. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant to - an EmbeddedResource. - properties: - annotations: - additionalProperties: + secrets: + items: + type: string + type: array + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: + privileged: + type: boolean + procMount: type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - spec: - description: |- - Spec defines the desired characteristics of a volume requested by a pod author. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxChangePolicy: type: string - type: array - x-kubernetes-list-type: atomic - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. - type: string - required: - - kind - - name - type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + supplementalGroupsPolicy: + type: string + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + serviceAccountName: + type: string + shardCount: + type: integer + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + - type: integer + - type: string x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: anyOf: - - type: integer - - type: string + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + statefulMode: + type: boolean + statefulRollingUpdateStrategy: + type: string + statefulStorage: + properties: + disableMountSubPath: + type: boolean + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - selector: - description: selector is a label query over volumes to - consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. + type: object + volumeClaimTemplate: + properties: + apiVersion: + type: string + kind: + type: string + metadata: properties: - key: - description: key is the label key that the selector - applies to. + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. + volumeAttributesClassName: type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. + volumeMode: + type: string + volumeName: + type: string + type: object + status: + properties: + accessModes: items: type: string type: array x-kubernetes-list-type: atomic - required: - - key - - operator + allocatedResourceStatuses: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + conditions: + items: + properties: + lastProbeTime: + format: date-time + type: string + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentVolumeAttributesClassName: + type: string + modifyVolumeStatus: + properties: + status: + type: string + targetVolumeAttributesClassName: + type: string + required: + - status + type: object + phase: + type: string type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string or nil value indicates that no - VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, - this field can be reset to its previous value (including nil) to cancel the modification. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the - PersistentVolume backing this claim. - type: string - type: object - status: - description: |- - Status represents the current information/status of a persistent volume claim. - Read-only. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the actual access modes the volume backing the PVC has. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - x-kubernetes-list-type: atomic - allocatedResourceStatuses: - additionalProperties: - description: |- - When a controller receives persistentvolume claim update with ClaimResourceStatus for a resource - that it does not recognizes, then it should ignore that update and let other controllers - handle it. - type: string - description: "allocatedResourceStatuses stores status - of resource being resized for the given PVC.\nKey names - follow standard Kubernetes label syntax. Valid values - are either:\n\t* Un-prefixed keys:\n\t\t- storage - - the capacity of the volume.\n\t* Custom resources must - use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or have - kubernetes.io prefix are considered\nreserved and hence - may not be used.\n\nClaimResourceStatus can be in any - of following states:\n\t- ControllerResizeInProgress:\n\t\tState - set when resize controller starts resizing the volume - in control-plane.\n\t- ControllerResizeFailed:\n\t\tState - set when resize has failed in resize controller with - a terminal error.\n\t- NodeResizePending:\n\t\tState - set when resize controller has finished resizing the - volume but further resizing of\n\t\tvolume is needed - on the node.\n\t- NodeResizeInProgress:\n\t\tState set - when kubelet starts resizing the volume.\n\t- NodeResizeFailed:\n\t\tState - set when resizing has failed in kubelet with a terminal - error. Transient errors don't set\n\t\tNodeResizeFailed.\nFor - example: if expanding a PVC for more capacity - this - field can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeFailed\"\nWhen this field is not set, - it means that no resize operation is in progress for - the given PVC.\n\nA controller that receives PVC update - with previously unknown resourceName or ClaimResourceStatus\nshould - ignore the update for the purpose it was designed. For - example - a controller that\nonly is responsible for - resizing capacity of the volume, should ignore PVC updates - that change other valid\nresources associated with PVC.\n\nThis - is an alpha field and requires enabling RecoverVolumeExpansionFailure - feature." - type: object - x-kubernetes-map-type: granular - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: "allocatedResources tracks the resources - allocated to a PVC including its capacity.\nKey names - follow standard Kubernetes label syntax. Valid values - are either:\n\t* Un-prefixed keys:\n\t\t- storage - - the capacity of the volume.\n\t* Custom resources must - use implementation-defined prefixed names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or have - kubernetes.io prefix are considered\nreserved and hence - may not be used.\n\nCapacity reported here may be larger - than the actual capacity when a volume expansion operation\nis - requested.\nFor storage quota, the larger value from - allocatedResources and PVC.spec.resources is used.\nIf - allocatedResources is not set, PVC.spec.resources alone - is used for quota calculation.\nIf a volume expansion - capacity request is lowered, allocatedResources is only\nlowered - if there are no expansion operations in progress and - if the actual volume capacity\nis equal or lower than - the requested capacity.\n\nA controller that receives - PVC update with previously unknown resourceName\nshould - ignore the update for the purpose it was designed. For - example - a controller that\nonly is responsible for - resizing capacity of the volume, should ignore PVC updates - that change other valid\nresources associated with PVC.\n\nThis - is an alpha field and requires enabling RecoverVolumeExpansionFailure - feature." - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: capacity represents the actual resources - of the underlying volume. - type: object - conditions: - description: |- - conditions is the current Condition of persistent volume claim. If underlying persistent volume is being - resized then the Condition will be set to 'Resizing'. - items: - description: PersistentVolumeClaimCondition contains - details about state of pvc - properties: - lastProbeTime: - description: lastProbeTime is the time we probed - the condition. - format: date-time - type: string - lastTransitionTime: - description: lastTransitionTime is the time the - condition transitioned from one status to another. - format: date-time - type: string - message: - description: message is the human-readable message - indicating details about last transition. - type: string - reason: - description: |- - reason is a unique, this should be a short, machine understandable string that gives the reason - for condition's last transition. If it reports "Resizing" that means the underlying - persistent volume is being resized. - type: string - status: - description: |- - Status is the status of the condition. - Can be True, False, Unknown. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required - type: string - type: - description: |- - Type is the type of the condition. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about - type: string - required: - - status - - type type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - currentVolumeAttributesClassName: - description: |- - currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. - When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim - type: string - modifyVolumeStatus: - description: |- - ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. - When this is unset, there is no ModifyVolume operation being attempted. + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: properties: - status: - description: "status is the status of the ControllerModifyVolume - operation. It can be in any of following states:\n - - Pending\n Pending indicates that the PersistentVolumeClaim - cannot be modified due to unmet requirements, such - as\n the specified VolumeAttributesClass not existing.\n - - InProgress\n InProgress indicates that the volume - is being modified.\n - Infeasible\n Infeasible - indicates that the request has been rejected as - invalid by the CSI driver. To\n\t resolve the error, - a valid VolumeAttributesClass needs to be specified.\nNote: - New statuses can be added in the future. Consumers - should check for unknown statuses and fail appropriately." - type: string - targetVolumeAttributesClassName: - description: targetVolumeAttributesClassName is the - name of the VolumeAttributesClass the PVC currently - being reconciled + effect: type: string - required: - - status - type: object - phase: - description: phase represents the current phase of PersistentVolumeClaim. - type: string - type: object - type: object - type: object - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container graceful - termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread matching - pods among the given topology. - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that may - be accessed by any container in the pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - writer: - description: |- - Metrics destination for VMAnomaly - See https://docs.victoriametrics.com/anomaly-detection/components/writer/ - properties: - basicAuth: - description: Basic auth defines basic authorization configuration - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearer: - description: 'BearerAuth defines authorization with Authorization: - Bearer header' - properties: - bearerTokenFile: - description: Path to bearer token file - type: string - bearerTokenSecret: - description: Optional bearer auth token to use for -remoteWrite.url - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - datasourceURL: - description: |- - DatasourceURL defines remote write url for write requests - provided endpoint must serve /api/v1/import path - vmanomaly joins datasourceURL + "/api/v1/import" - type: string - healthPath: - description: HealthPath defines absolute or relative URL address - where to check availability of the remote webserver - type: string - metricFormat: - description: Metrics to save the output (in metric names or labels) - properties: - __name__: - description: |- - Name of result metric - Must have a value with $VAR placeholder in it to distinguish between resulting metrics - type: string - extraLabels: - additionalProperties: - type: string - description: ExtraLabels defines additional labels to be added - to the resulting metrics - type: object - for: - description: For is a special label with $QUERY_KEY placeholder - type: string - required: - - __name__ - - for - type: object - tenantID: - description: TenantID defines for VictoriaMetrics Cluster version - only, tenants are identified by accountID, accountID:projectID - or multitenant. - type: string - timeout: - description: Timeout for the requests, passed as a string - type: string - tlsConfig: - description: TLSConfig defines tls connection configuration - properties: - ca: - description: Struct containing the CA cert to use for the - targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: key: - description: The key to select. type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. + type: array + topologySpreadConstraints: + items: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean required: - - key + - maxSkew + - topologyKey + - whenUnsatisfiable type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container to use for - the targets. - type: string - cert: - description: Struct containing the client cert file for the - targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. + type: array + updateStrategy: + enum: + - Recreate + - RollingUpdate + type: string + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + useVMConfigReloader: + type: boolean + volumeMounts: + items: properties: - key: - description: The key to select. + mountPath: + type: string + mountPropagation: type: string name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined + readOnly: type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string required: - - key + - mountPath + - name type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. + type: array + volumes: + items: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + default: ext4 + type: string + kind: + type: string + readOnly: + default: false + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + properties: + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + wwids: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + image: + properties: + pullPolicy: + type: string + reference: + type: string + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + default: default + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + x-kubernetes-list-type: atomic + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podCertificate: + properties: + certificateChainPath: + type: string + credentialBundlePath: + type: string + keyPath: + type: string + keyType: + type: string + maxExpirationSeconds: + format: int32 + type: integer + signerName: + type: string + required: + - keyType + - signerName + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + x-kubernetes-list-type: atomic + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + default: /etc/ceph/keyring + type: string + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + pool: + default: rbd + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + default: admin + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + default: xfs + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + type: boolean + storageMode: + default: ThinProvisioned + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object required: - - key + - name type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the container - for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container - for the targets. - type: string - keySecret: - description: Secret containing the client key file for the - targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string - type: object - required: - - datasourceURL - type: object - required: - - reader - - writer - type: object - status: - description: VMAnomalyStatus defines the observed state of VMAnomaly. - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 - type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - shards: - description: Shards represents total number of vmanomaly statefulsets - with uniq scrape targets - format: int32 - type: integer - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - type: object - served: true - storage: true - subresources: - scale: - labelSelectorPath: .status.selector - specReplicasPath: .spec.shardCount - statusReplicasPath: .status.shards - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.18.0 - name: vmauths.operator.victoriametrics.com -spec: - group: operator.victoriametrics.com - names: - kind: VMAuth - listKind: VMAuthList - plural: vmauths - singular: vmauth - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: Current status of update rollout - jsonPath: .status.updateStatus - name: Status - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - description: The desired replicas number of VMAuth - jsonPath: .spec.replicaCount - name: ReplicaCount - type: integer - name: v1beta1 - schema: - openAPIV3Schema: - description: VMAuth is the Schema for the vmauths API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VMAuthSpec defines the desired state of VMAuth - properties: - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: - type: string - type: array - configReloadAuthKeySecret: - description: |- - ConfigReloadAuthKeySecret defines optional secret reference authKey for /-/reload API requests. - Given secret reference will be added to the application and vm-config-reloader as volume - available since v0.57.0 version - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - configReloaderExtraArgs: - additionalProperties: - type: string - description: |- - ConfigReloaderExtraArgs that will be passed to VMAuths config-reloader container - for example resyncInterval: "30s" - type: object - configReloaderImageTag: - description: ConfigReloaderImageTag defines image:tag for config-reloader - container - type: string - configReloaderResources: - description: |- - ConfigReloaderResources config-reloader container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - configSecret: - description: |- - ConfigSecret is the name of a Kubernetes Secret in the same namespace as the - VMAuth object, which contains auth configuration for vmauth, - configuration must be inside secret key: config.yaml. - It must be created and managed manually. - If it's defined, configuration for vmauth becomes unmanaged and operator'll not create any related secrets/config-reloaders - Deprecated: use externalConfig.secretRef instead - type: string - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to run - within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: - x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. - properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this DNS resolver option's value. - type: string - type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - externalConfig: - description: |- - ExternalConfig defines a source of external VMAuth configuration. - If it's defined, configuration for vmauth becomes unmanaged and operator'll not create any related secrets/config-reloaders - properties: - localPath: - description: |- - LocalPath contains static path to a config, which is managed externally for cases - when using secrets is not applicable, e.g.: Vault sidecar. - type: string - secretRef: - description: SecretRef defines selector for externally managed - secret which contains configuration - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application container - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of ConfigMaps - or Secrets - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean + type: array type: object - x-kubernetes-map-type: atomic - type: object - type: array - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. + tenantID: type: string - required: - - ip - type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the node - network namespace - type: boolean - hpa: - description: Configures horizontal pod autoscaling. - properties: - behaviour: - description: |- - HorizontalPodAutoscalerBehavior configures the scaling behavior of the target - in both Up and Down directions (scaleUp and scaleDown fields respectively). - properties: - scaleDown: - description: |- - scaleDown is scaling policy for scaling Down. - If not set, the default value is to allow to scale down to minReplicas pods, with a - 300 second stabilization window (i.e., the highest recommendation for - the last 300sec is used). - properties: - policies: - description: |- - policies is a list of potential scaling polices which can be used during scaling. - If not set, use the default values: - - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. - - For scale down: allow all pods to be removed in a 15s window. - items: - description: HPAScalingPolicy is a single policy which - must hold true for a specified past interval. + type: object + vmauth: + properties: + name: + type: string + spec: + properties: + affinity: + properties: + nodeAffinity: properties: - periodSeconds: - description: |- - periodSeconds specifies the window of time for which the policy should hold true. - PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). - format: int32 - type: integer - type: - description: type is used to specify the scaling - policy. - type: string - value: - description: |- - value contains the amount of change which is permitted by the policy. - It must be greater than zero - format: int32 - type: integer - required: - - periodSeconds - - type - - value + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic type: object - type: array - x-kubernetes-list-type: atomic - selectPolicy: - description: |- - selectPolicy is used to specify which policy should be used. - If not set, the default value Max is used. - type: string - stabilizationWindowSeconds: - description: |- - stabilizationWindowSeconds is the number of seconds for which past recommendations should be - considered while scaling up or scaling down. - StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). - If not set, use the default values: - - For scale up: 0 (i.e. no stabilization is done). - - For scale down: 300 (i.e. the stabilization window is 300 seconds long). - format: int32 - type: integer - tolerance: - anyOf: - - type: integer - - type: string - description: |- - tolerance is the tolerance on the ratio between the current and desired - metric value under which no updates are made to the desired number of - replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not - set, the default cluster-wide tolerance is applied (by default 10%). - - For example, if autoscaling is configured with a memory consumption target of 100Mi, - and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be - triggered when the actual consumption falls below 95Mi or exceeds 101Mi. - - This is an alpha field and requires enabling the HPAConfigurableTolerance - feature gate. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - scaleUp: - description: |- - scaleUp is scaling policy for scaling Up. - If not set, the default value is the higher of: - * increase no more than 4 pods per 60 seconds - * double the number of pods per 60 seconds - No stabilization is used. - properties: - policies: - description: |- - policies is a list of potential scaling polices which can be used during scaling. - If not set, use the default values: - - For scale up: allow doubling the number of pods, or an absolute change of 4 pods in a 15s window. - - For scale down: allow all pods to be removed in a 15s window. - items: - description: HPAScalingPolicy is a single policy which - must hold true for a specified past interval. + podAffinity: properties: - periodSeconds: - description: |- - periodSeconds specifies the window of time for which the policy should hold true. - PeriodSeconds must be greater than zero and less than or equal to 1800 (30 min). - format: int32 - type: integer - type: - description: type is used to specify the scaling - policy. - type: string - value: - description: |- - value contains the amount of change which is permitted by the policy. - It must be greater than zero - format: int32 - type: integer - required: - - periodSeconds - - type - - value + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic type: object - type: array - x-kubernetes-list-type: atomic - selectPolicy: - description: |- - selectPolicy is used to specify which policy should be used. - If not set, the default value Max is used. - type: string - stabilizationWindowSeconds: - description: |- - stabilizationWindowSeconds is the number of seconds for which past recommendations should be - considered while scaling up or scaling down. - StabilizationWindowSeconds must be greater than or equal to zero and less than or equal to 3600 (one hour). - If not set, use the default values: - - For scale up: 0 (i.e. no stabilization is done). - - For scale down: 300 (i.e. the stabilization window is 300 seconds long). - format: int32 - type: integer - tolerance: - anyOf: - - type: integer - - type: string - description: |- - tolerance is the tolerance on the ratio between the current and desired - metric value under which no updates are made to the desired number of - replicas (e.g. 0.01 for 1%). Must be greater than or equal to zero. If not - set, the default cluster-wide tolerance is applied (by default 10%). - - For example, if autoscaling is configured with a memory consumption target of 100Mi, - and scale-down and scale-up tolerances of 5% and 1% respectively, scaling will be - triggered when the actual consumption falls below 95Mi or exceeds 101Mi. - - This is an alpha field and requires enabling the HPAConfigurableTolerance - feature gate. - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - type: object - maxReplicas: - format: int32 - type: integer - metrics: - items: - description: |- - MetricSpec specifies how to scale based on a single metric - (only `type` and one other matching field should be set at once). - properties: - containerResource: - description: |- - containerResource refers to a resource metric (such as those specified in - requests and limits) known to Kubernetes describing a single container in - each pod of the current scale target (e.g. CPU or memory). Such metrics are - built in to Kubernetes, and have special scaling options on top of those - available to normal per-pod metrics using the "pods" source. - properties: - container: - description: container is the name of the container - in the pods of the scaling target - type: string - name: - description: name is the name of the resource in question. - type: string - target: - description: target specifies the target value for the - given metric + podAntiAffinity: properties: - averageUtilization: - description: |- - averageUtilization is the target value of the average of the - resource metric across all relevant pods, represented as a percentage of - the requested value of the resource for the pods. - Currently only valid for Resource metric source type - format: int32 - type: integer - averageValue: - anyOf: - - type: integer - - type: string - description: |- - averageValue is the target value of the average of the - metric across all relevant pods (as a quantity) - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: - description: type represents whether the metric - type is Utilization, Value, or AverageValue - type: string - value: - anyOf: - - type: integer - - type: string - description: value is the target value of the metric - (as a quantity). - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - required: - - type + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic type: object - required: - - container - - name - - target - type: object - external: - description: |- - external refers to a global metric that is not associated - with any Kubernetes object. It allows autoscaling based on information - coming from components running outside of cluster - (for example length of queue in cloud messaging service, or - QPS from loadbalancer running outside of cluster). - properties: - metric: - description: metric identifies the target metric by - name and selector - properties: - name: - description: name is the name of the given metric + type: object + configMaps: + items: + type: string + type: array + containers: + items: + properties: + args: + items: type: string - selector: - description: |- - selector is the string-encoded form of a standard kubernetes label selector for the given metric - When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. - When unset, just the metricName will be used to gather metrics. + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. + command: items: type: string type: array x-kubernetes-list-type: atomic - required: - - key - - operator type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - required: - - name - type: object - target: - description: target specifies the target value for the - given metric - properties: - averageUtilization: - description: |- - averageUtilization is the target value of the average of the - resource metric across all relevant pods, represented as a percentage of - the requested value of the resource for the pods. - Currently only valid for Resource metric source type - format: int32 - type: integer - averageValue: - anyOf: - - type: integer - - type: string - description: |- - averageValue is the target value of the average of the - metric across all relevant pods (as a quantity) - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: - description: type represents whether the metric - type is Utilization, Value, or AverageValue - type: string - value: - anyOf: - - type: integer - - type: string - description: value is the target value of the metric - (as a quantity). - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - required: - - type - type: object - required: - - metric - - target - type: object - object: - description: |- - object refers to a metric describing a single kubernetes object - (for example, hits-per-second on an Ingress object). - properties: - describedObject: - description: describedObject specifies the descriptions - of a object,such as kind,name apiVersion - properties: - apiVersion: - description: apiVersion is the API version of the - referent - type: string - kind: - description: 'kind is the kind of the referent; - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' - type: string - name: - description: 'name is the name of the referent; - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' - type: string - required: - - kind - - name - type: object - metric: - description: metric identifies the target metric by - name and selector - properties: - name: - description: name is the name of the given metric - type: string - selector: - description: |- - selector is the string-encoded form of a standard kubernetes label selector for the given metric - When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. - When unset, just the metricName will be used to gather metrics. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. + httpGet: properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. + host: type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. + httpHeaders: items: - type: string + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object type: array x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string required: - - key - - operator + - port type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - required: - - name - type: object - target: - description: target specifies the target value for the - given metric - properties: - averageUtilization: - description: |- - averageUtilization is the target value of the average of the - resource metric across all relevant pods, represented as a percentage of - the requested value of the resource for the pods. - Currently only valid for Resource metric source type - format: int32 - type: integer - averageValue: - anyOf: - - type: integer - - type: string - description: |- - averageValue is the target value of the average of the - metric across all relevant pods (as a quantity) - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: - description: type represents whether the metric - type is Utilization, Value, or AverageValue - type: string - value: - anyOf: - - type: integer - - type: string - description: value is the target value of the metric - (as a quantity). - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - required: - - type - type: object - required: - - describedObject - - metric - - target - type: object - pods: - description: |- - pods refers to a metric describing each pod in the current scale target - (for example, transactions-processed-per-second). The values will be - averaged together before being compared to the target value. - properties: - metric: - description: metric identifies the target metric by - name and selector - properties: - name: - description: name is the name of the given metric - type: string - selector: - description: |- - selector is the string-encoded form of a standard kubernetes label selector for the given metric - When set, it is passed as an additional parameter to the metrics server for more specific metrics scoping. - When unset, just the metricName will be used to gather metrics. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. + sleep: properties: - key: - description: key is the label key that - the selector applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: items: type: string type: array x-kubernetes-list-type: atomic - required: - - key - - operator type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - required: - - name - type: object - target: - description: target specifies the target value for the - given metric - properties: - averageUtilization: - description: |- - averageUtilization is the target value of the average of the - resource metric across all relevant pods, represented as a percentage of - the requested value of the resource for the pods. - Currently only valid for Resource metric source type - format: int32 - type: integer - averageValue: - anyOf: - - type: integer - - type: string - description: |- - averageValue is the target value of the average of the - metric across all relevant pods (as a quantity) - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: - description: type represents whether the metric - type is Utilization, Value, or AverageValue - type: string - value: - anyOf: - - type: integer - - type: string - description: value is the target value of the metric - (as a quantity). - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - required: - - type - type: object - required: - - metric - - target - type: object - resource: - description: |- - resource refers to a resource metric (such as those specified in - requests and limits) known to Kubernetes describing each pod in the - current scale target (e.g. CPU or memory). Such metrics are built in to - Kubernetes, and have special scaling options on top of those available - to normal per-pod metrics using the "pods" source. - properties: - name: - description: name is the name of the resource in question. - type: string - target: - description: target specifies the target value for the - given metric - properties: - averageUtilization: - description: |- - averageUtilization is the target value of the average of the - resource metric across all relevant pods, represented as a percentage of - the requested value of the resource for the pods. - Currently only valid for Resource metric source type - format: int32 - type: integer - averageValue: - anyOf: - - type: integer - - type: string - description: |- - averageValue is the target value of the average of the - metric across all relevant pods (as a quantity) - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: - description: type represents whether the metric - type is Utilization, Value, or AverageValue - type: string - value: - anyOf: - - type: integer - - type: string - description: value is the target value of the metric - (as a quantity). - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - required: - - type - type: object - required: - - name - - target - type: object - type: - description: |- - type is the type of metric source. It should be one of "ContainerResource", "External", - "Object", "Pods" or "Resource", each mapping to a matching field in the object. - type: string - required: - - type - type: object - type: array - minReplicas: - format: int32 - type: integer - type: object - httpRoute: - description: HTTPRoute enables httproute configuration for VMAuth. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - extraRules: - description: ExtraRules defines custom HTTPRouteRule in raw form, - bypassing Gateway API CEL validations. - items: - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - x-kubernetes-preserve-unknown-fields: true - hostnames: - description: |- - Hostnames defines a set of hostnames that should match against the HTTP Host - header to select a HTTPRoute used to process the request. - items: - description: |- - Hostname is the fully qualified domain name of a network host. This matches - the RFC 1123 definition of a hostname with 2 notable exceptions: - - 1. IPs are not allowed. - 2. A hostname may be prefixed with a wildcard label (`*.`). The wildcard - label must appear by itself as the first label. - - Hostname can be "precise" which is a domain name without the terminating - dot of a network host (e.g. "foo.example.com") or "wildcard", which is a - domain name prefixed with a single wildcard label (e.g. `*.example.com`). - - Note that as per RFC1035 and RFC1123, a *label* must consist of lower case - alphanumeric characters or '-', and must start and end with an alphanumeric - character. No other punctuation is allowed. - maxLength: 253 - minLength: 1 - pattern: ^(\*\.)?[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - type: array - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - parentRefs: - description: ParentRefs references the resources (usually Gateways) - that a Route wants to be attached to. - items: - description: |- - ParentReference identifies an API object (usually a Gateway) that can be considered - a parent of this resource (usually a route). There are two kinds of parent resources - with "Core" support: - - * Gateway (Gateway conformance profile) - * Service (Mesh conformance profile, ClusterIP Services only) - - This API may be extended in the future to support additional kinds of parent - resources. - - The API object must be valid in the cluster; the Group and Kind must - be registered in the cluster for this reference to be valid. - properties: - group: - default: gateway.networking.k8s.io - description: |- - Group is the group of the referent. - When unspecified, "gateway.networking.k8s.io" is inferred. - To set the core API group (such as for a "Service" kind referent), - Group must be explicitly set to "" (empty string). - - Support: Core - maxLength: 253 - pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - kind: - default: Gateway - description: |- - Kind is kind of the referent. - - There are two kinds of parent resources with "Core" support: - - * Gateway (Gateway conformance profile) - * Service (Mesh conformance profile, ClusterIP Services only) - - Support for other resources is Implementation-Specific. - maxLength: 63 - minLength: 1 - pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ - type: string - name: - description: |- - Name is the name of the referent. - - Support: Core - maxLength: 253 - minLength: 1 - type: string - namespace: - description: |- - Namespace is the namespace of the referent. When unspecified, this refers - to the local namespace of the Route. - - Note that there are specific rules for ParentRefs which cross namespace - boundaries. Cross-namespace references are only valid if they are explicitly - allowed by something in the namespace they are referring to. For example: - Gateway has the AllowedRoutes field, and ReferenceGrant provides a - generic way to enable any other kind of cross-namespace reference. - - - ParentRefs from a Route to a Service in the same namespace are "producer" - routes, which apply default routing rules to inbound connections from - any namespace to the Service. - - ParentRefs from a Route to a Service in a different namespace are - "consumer" routes, and these routing rules are only applied to outbound - connections originating from the same namespace as the Route, for which - the intended destination of the connections are a Service targeted as a - ParentRef of the Route. - - - Support: Core - maxLength: 63 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ - type: string - port: - description: |- - Port is the network port this Route targets. It can be interpreted - differently based on the type of parent resource. - - When the parent resource is a Gateway, this targets all listeners - listening on the specified port that also support this kind of Route(and - select this Route). It's not recommended to set `Port` unless the - networking behaviors specified in a Route must apply to a specific port - as opposed to a listener(s) whose port(s) may be changed. When both Port - and SectionName are specified, the name and port of the selected listener - must match both specified values. - - - When the parent resource is a Service, this targets a specific port in the - Service spec. When both Port (experimental) and SectionName are specified, - the name and port of the selected port must match both specified values. - - - Implementations MAY choose to support other parent resources. - Implementations supporting other types of parent resources MUST clearly - document how/if Port is interpreted. - - For the purpose of status, an attachment is considered successful as - long as the parent resource accepts it partially. For example, Gateway - listeners can restrict which Routes can attach to them by Route kind, - namespace, or hostname. If 1 of 2 Gateway listeners accept attachment - from the referencing Route, the Route MUST be considered successfully - attached. If no Gateway listeners accept attachment from this Route, - the Route MUST be considered detached from the Gateway. - - Support: Extended - format: int32 - maximum: 65535 - minimum: 1 - type: integer - sectionName: - description: |- - SectionName is the name of a section within the target resource. In the - following resources, SectionName is interpreted as the following: - - * Gateway: Listener name. When both Port (experimental) and SectionName - are specified, the name and port of the selected listener must match - both specified values. - * Service: Port name. When both Port (experimental) and SectionName - are specified, the name and port of the selected listener must match - both specified values. - - Implementations MAY choose to support attaching Routes to other resources. - If that is the case, they MUST clearly document how SectionName is - interpreted. - - When unspecified (empty string), this will reference the entire resource. - For the purpose of status, an attachment is considered successful if at - least one section in the parent resource accepts it. For example, Gateway - listeners can restrict which Routes can attach to them by Route kind, - namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from - the referencing Route, the Route MUST be considered successfully - attached. If no Gateway listeners accept attachment from this Route, the - Route MUST be considered detached from the Gateway. - - Support: Core - maxLength: 253 - minLength: 1 - pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ - type: string - required: - - name - type: object - type: array - type: object - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image + it's repository - if needed - type: string - tag: - description: Tag contains desired docker image version - type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - type: array - ingress: - description: Ingress enables ingress configuration for VMAuth. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - class_name: - description: ClassName defines ingress class name for VMAuth - type: string - extraRules: - description: |- - ExtraRules - additional rules for ingress, - must be checked for correctness by user. - items: - description: |- - IngressRule represents the rules mapping the paths under a specified host to - the related backend services. Incoming requests are first evaluated for a host - match, then routed to the backend associated with the matching IngressRuleValue. - properties: - host: - description: "host is the fully qualified domain name of - a network host, as defined by RFC 3986.\nNote the following - deviations from the \"host\" part of the\nURI as defined - in RFC 3986:\n1. IPs are not allowed. Currently an IngressRuleValue - can only apply to\n the IP in the Spec of the parent - Ingress.\n2. The `:` delimiter is not respected because - ports are not allowed.\n\t Currently the port of an Ingress - is implicitly :80 for http and\n\t :443 for https.\nBoth - these may change in the future.\nIncoming requests are - matched against the host before the\nIngressRuleValue. - If the host is unspecified, the Ingress routes all\ntraffic - based on the specified IngressRuleValue.\n\nhost can be - \"precise\" which is a domain name without the terminating - dot of\na network host (e.g. \"foo.bar.com\") or \"wildcard\", - which is a domain name\nprefixed with a single wildcard - label (e.g. \"*.foo.com\").\nThe wildcard character '*' - must appear by itself as the first DNS label and\nmatches - only a single label. You cannot have a wildcard label - by itself (e.g. Host == \"*\").\nRequests will be matched - against the Host field in the following way:\n1. If host - is precise, the request matches this rule if the http - host header is equal to Host.\n2. If host is a wildcard, - then the request matches this rule if the http host header\nis - to equal to the suffix (removing the first label) of the - wildcard rule." - type: string - http: - description: |- - HTTPIngressRuleValue is a list of http selectors pointing to backends. - In the example: http:///? -> backend where - where parts of the url correspond to RFC 3986, this resource will be used - to match against everything after the last '/' and before the first '?' - or '#'. - properties: - paths: - description: paths is a collection of paths that map - requests to backends. - items: - description: |- - HTTPIngressPath associates a path with a backend. Incoming urls matching the - path are forwarded to the backend. - properties: - backend: - description: |- - backend defines the referenced service endpoint to which the traffic - will be forwarded to. - properties: - resource: - description: |- - resource is an ObjectRef to another Kubernetes resource in the namespace - of the Ingress object. If resource is specified, a service.Name and - service.Port must not be specified. - This is a mutually exclusive setting with "Service". + httpGet: properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. + host: type: string - kind: - description: Kind is the type of resource - being referenced + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: type: string - name: - description: Name is the name of resource - being referenced + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: type: string required: - - kind - - name + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds type: object - x-kubernetes-map-type: atomic - service: - description: |- - service references a service as a backend. - This is a mutually exclusive setting with "Resource". + tcpSocket: properties: - name: - description: |- - name is the referenced service. The service must exist in - the same namespace as the Ingress object. + host: type: string port: - description: |- - port of the referenced service. A port name or port number - is required for a IngressServiceBackend. - properties: - name: - description: |- - name is the name of the port on the Service. - This is a mutually exclusive setting with "Number". - type: string - number: - description: |- - number is the numerical port number (e.g. 80) on the Service. - This is a mutually exclusive setting with "Name". - format: int32 - type: integer - type: object - x-kubernetes-map-type: atomic + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true required: - - name + - port type: object type: object - path: - description: |- - path is matched against the path of an incoming request. Currently it can - contain characters disallowed from the conventional "path" part of a URL - as defined by RFC 3986. Paths must begin with a '/' and must be present - when using PathType with value "Exact" or "Prefix". - type: string - pathType: - description: |- - pathType determines the interpretation of the path matching. PathType can - be one of the following values: - * Exact: Matches the URL path exactly. - * Prefix: Matches based on a URL path prefix split by '/'. Matching is - done on a path element by element basis. A path element refers is the - list of labels in the path split by the '/' separator. A request is a - match for path p if every p is an element-wise prefix of p of the - request path. Note that if the last element of the path is a substring - of the last element in request path, it is not a match (e.g. /foo/bar - matches /foo/bar/baz, but does not match /foo/barbaz). - * ImplementationSpecific: Interpretation of the Path matching is up to - the IngressClass. Implementations can treat this as a separate PathType - or treat it identically to Prefix or Exact path types. - Implementations are required to support all path types. + stopSignal: type: string - required: - - backend - - pathType type: object - type: array - x-kubernetes-list-type: atomic - required: - - paths - type: object - type: object - type: array - extraTls: - description: |- - ExtraTLS - additional TLS configuration for ingress - must be checked for correctness by user. - items: - description: IngressTLS describes the transport layer security - associated with an ingress. - properties: - hosts: - description: |- - hosts is a list of hosts included in the TLS certificate. The values in - this list must match the name/s used in the tlsSecret. Defaults to the - wildcard host setting for the loadbalancer controller fulfilling this - Ingress, if left unspecified. - items: - type: string - type: array - x-kubernetes-list-type: atomic - secretName: - description: |- - secretName is the name of the secret used to terminate TLS traffic on - port 443. Field is left optional to allow TLS routing based on SNI - hostname alone. If the SNI host in a listener conflicts with the "Host" - header field used by an IngressRule, the SNI host is used for termination - and value of the "Host" header is used for routing. - type: string - type: object - type: array - host: - description: |- - Host defines ingress host parameter for default rule - It will be used, only if TlsHosts is empty - type: string - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - paths: - description: Paths defines ingress paths parameter for default - rule - items: - type: string - type: array - tlsHosts: - description: TlsHosts configures TLS access for ingress, tlsSecretName - must be defined for it. - items: - type: string - type: array - tlsSecretName: - description: |- - TlsSecretName defines secretname at the VMAuth namespace with cert and key - https://kubernetes.io/docs/concepts/services-networking/ingress/#tls - type: string - type: object - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to run - within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - internalListenPort: - description: |- - InternalListenPort instructs vmauth to serve internal routes at given port - available from v0.56.0 operator - and v1.111.0 vmauth version - related doc https://docs.victoriametrics.com/victoriametrics/vmauth/#security - type: string - license: - description: |- - License allows to configure license key to be used for enterprise features. - Using license key is supported starting from VictoriaMetrics v1.94.0. - See [here](https://docs.victoriametrics.com/victoriametrics/enterprise/) - properties: - forceOffline: - description: Enforce offline verification of the license key. - type: boolean - key: - description: |- - Enterprise license key. This flag is available only in [VictoriaMetrics enterprise](https://docs.victoriametrics.com/victoriametrics/enterprise/). - To request a trial license, [go to](https://victoriametrics.com/products/enterprise/trial) - type: string - keyRef: - description: KeyRef is reference to secret with license key for - enterprise features. - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - reloadInterval: - description: Interval to be used for checking for license key - changes. Note that this is only applicable when using KeyRef. - type: string - type: object - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logFormat: - description: LogFormat for VMAuth to be configured with. - enum: - - default - - json - type: string - logLevel: - description: LogLevel for victoria metrics single to be configured - with. - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - managedMetadata: - description: |- - ManagedMetadata defines metadata that will be added to the all objects - created by operator for the given CustomResource - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - type: object - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - nodeSelector: - additionalProperties: - type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - podDisruptionBudget: - description: PodDisruptionBudget created by operator - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at most "maxUnavailable" pods selected by - "selector" are unavailable after the eviction, i.e. even in absence of - the evicted pod. For example, one can prevent all voluntary evictions - by specifying 0. This is a mutually exclusive setting with "minAvailable". - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at least "minAvailable" pods selected by - "selector" will still be available after the eviction, i.e. even in the - absence of the evicted pod. So for example you can prevent all voluntary - evictions by specifying "100%". - x-kubernetes-int-or-string: true - selectorLabels: - additionalProperties: - type: string - description: |- - replaces default labels selector generated by operator - it's useful when you need to create custom budget - type: object - unhealthyPodEvictionPolicy: - description: |- - UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods - - Valid policies are IfHealthyBudget and AlwaysAllow. - If no policy is specified, the default behavior will be used, - which corresponds to the IfHealthyBudget policy. - Available from operator v0.64.0 - enum: - - IfHealthyBudget - - AlwaysAllow - type: string - type: object - podMetadata: - description: PodMetadata configures Labels and Annotations which are - propagated to the VMAuth pods. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - port: - description: Port listen address - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods - type: string - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod condition - properties: - conditionType: - description: ConditionType refers to a condition in the pod's - condition list with matching type. - type: string - required: - - conditionType - type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - rollingUpdate: - description: |- - RollingUpdate - overrides deployment update params. - Available from operator v0.64.0 - properties: - maxSurge: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of pods that can be scheduled above the desired number of - pods. - Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - This can not be 0 if MaxUnavailable is 0. - Absolute number is calculated from percentage by rounding up. - Defaults to 25%. - Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when - the rolling update starts, such that the total number of old and new pods do not exceed - 130% of desired pods. Once old pods have been killed, - new ReplicaSet can be scaled up further, ensuring that total number of pods running - at any time during the update is at most 130% of desired pods. - x-kubernetes-int-or-string: true - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of pods that can be unavailable during the update. - Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - Absolute number is calculated from percentage by rounding down. - This can not be 0 if MaxSurge is 0. - Defaults to 25%. - Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods - immediately when the rolling update starts. Once new pods are ready, old ReplicaSet - can be scaled down further, followed by scaling up the new ReplicaSet, ensuring - that the total number of pods available at all times during the update is at - least 70% of desired pods. - x-kubernetes-int-or-string: true - type: object - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: - type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - selectAllByDefault: - description: |- - SelectAllByDefault changes default behavior for empty CRD selectors, such userSelector. - with selectAllByDefault: true and empty userSelector and userNamespaceSelector - Operator selects all exist users - with selectAllByDefault: false - selects nothing - type: boolean - serviceAccountName: - description: ServiceAccountName is the name of the ServiceAccount - to use to run the pods - type: string - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vmauth VMServiceScrape - spec - required: - - endpoints - type: object - x-kubernetes-preserve-unknown-fields: true - serviceSpec: - description: ServiceSpec that will be added to vmsingle service spec - properties: - metadata: - description: EmbeddedObjectMetadata defines objectMeta for additional - service. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - spec: - description: |- - ServiceSpec describes the attributes that a user creates on a service. - More info: https://kubernetes.io/docs/concepts/services-networking/service/ - type: object - x-kubernetes-preserve-unknown-fields: true - useAsDefault: - description: |- - UseAsDefault applies changes from given service definition to the main object Service - Changing from headless service to clusterIP or loadbalancer may break cross-component communication - type: boolean - required: - - spec - type: object - startupProbe: - description: StartupProbe that will be added to CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container graceful - termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread matching - pods among the given topology. - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - unauthorizedAccessConfig: - description: |- - UnauthorizedAccessConfig configures access for un authorized users - - Deprecated: use unauthorizedUserAccessSpec instead - will be removed at v1.0 release - x-kubernetes-preserve-unknown-fields: true - unauthorizedUserAccessSpec: - description: UnauthorizedUserAccessSpec defines unauthorized_user - config section of vmauth config - properties: - default_url: - description: |- - DefaultURLs backend url for non-matching paths filter - usually used for default backend with error message - items: - type: string - type: array - discover_backend_ips: - description: DiscoverBackendIPs instructs discovering URLPrefix - backend IPs via DNS. - type: boolean - drop_src_path_prefix_parts: - description: |- - DropSrcPathPrefixParts is the number of `/`-delimited request path prefix parts to drop before proxying the request to backend. - See [here](https://docs.victoriametrics.com/victoriametrics/vmauth/#dropping-request-path-prefix) for more details. - type: integer - dump_request_on_errors: - description: |- - DumpRequestOnErrors instructs vmauth to return detailed request params to the client - if routing rules don't allow to forward request to the backends. - Useful for debugging `src_hosts` and `src_headers` based routing rules - - available since v1.107.0 vmauth version - type: boolean - headers: - description: |- - Headers represent additional http headers, that vmauth uses - in form of ["header_key: header_value"] - multiple values for header key: - ["header_key: value1,value2"] - it's available since 1.68.0 version of vmauth - items: - type: string - type: array - ip_filters: - description: |- - IPFilters defines per target src ip filters - supported only with enterprise version of [vmauth](https://docs.victoriametrics.com/victoriametrics/vmauth/#ip-filters) - properties: - allow_list: - items: - type: string - type: array - deny_list: - items: - type: string - type: array - type: object - load_balancing_policy: - description: |- - LoadBalancingPolicy defines load balancing policy to use for backend urls. - Supported policies: least_loaded, first_available. - See [here](https://docs.victoriametrics.com/victoriametrics/vmauth/#load-balancing) for more details (default "least_loaded") - enum: - - least_loaded - - first_available - type: string - max_concurrent_requests: - description: |- - MaxConcurrentRequests defines max concurrent requests per user - 300 is default value for vmauth - type: integer - metric_labels: - additionalProperties: - type: string - description: MetricLabels - additional labels for metrics exported - by vmauth for given user. - type: object - response_headers: - description: |- - ResponseHeaders represent additional http headers, that vmauth adds for request response - in form of ["header_key: header_value"] - multiple values for header key: - ["header_key: value1,value2"] - it's available since 1.93.0 version of vmauth - items: - type: string - type: array - retry_status_codes: - description: |- - RetryStatusCodes defines http status codes in numeric format for request retries - e.g. [429,503] - items: - type: integer - type: array - tlsConfig: - description: TLSConfig defines tls configuration for the backend - connection - properties: - ca: - description: Struct containing the CA cert to use for the - targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container to use for - the targets. - type: string - cert: - description: Struct containing the client cert file for the - targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the container - for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container - for the targets. - type: string - keySecret: - description: Secret containing the client key file for the - targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string - type: object - url_map: - items: - description: |- - UnauthorizedAccessConfigURLMap defines element of url_map routing configuration - For UnauthorizedAccessConfig and VMAuthUnauthorizedUserAccessSpec.URLMap - properties: - discover_backend_ips: - description: DiscoverBackendIPs instructs discovering URLPrefix - backend IPs via DNS. - type: boolean - drop_src_path_prefix_parts: - description: |- - DropSrcPathPrefixParts is the number of `/`-delimited request path prefix parts to drop before proxying the request to backend. - See [here](https://docs.victoriametrics.com/victoriametrics/vmauth/#dropping-request-path-prefix) for more details. - type: integer - headers: - description: |- - RequestHeaders represent additional http headers, that vmauth uses - in form of ["header_key: header_value"] - multiple values for header key: - ["header_key: value1,value2"] - it's available since 1.68.0 version of vmauth - items: - type: string - type: array - load_balancing_policy: - description: |- - LoadBalancingPolicy defines load balancing policy to use for backend urls. - Supported policies: least_loaded, first_available. - See [here](https://docs.victoriametrics.com/victoriametrics/vmauth/#load-balancing) for more details (default "least_loaded") - enum: - - least_loaded - - first_available - type: string - response_headers: - description: |- - ResponseHeaders represent additional http headers, that vmauth adds for request response - in form of ["header_key: header_value"] - multiple values for header key: - ["header_key: value1,value2"] - it's available since 1.93.0 version of vmauth - items: - type: string - type: array - retry_status_codes: - description: |- - RetryStatusCodes defines http status codes in numeric format for request retries - Can be defined per target or at VMUser.spec level - e.g. [429,503] - items: - type: integer - type: array - src_headers: - description: SrcHeaders is an optional list of headers, - which must match request headers. - items: - type: string - type: array - src_hosts: - description: SrcHosts is an optional list of regular expressions, - which must match the request hostname. - items: - type: string - type: array - src_paths: - description: SrcPaths is an optional list of regular expressions, - which must match the request path. - items: - type: string - type: array - src_query_args: - description: SrcQueryArgs is an optional list of query args, - which must match request URL query args. - items: - type: string - type: array - url_prefix: - description: |- - UrlPrefix contains backend url prefixes for the proxied request url. - URLPrefix defines prefix prefix for destination - x-kubernetes-preserve-unknown-fields: true - type: object - type: array - url_prefix: - description: URLPrefix defines prefix prefix for destination - x-kubernetes-preserve-unknown-fields: true - type: object - updateStrategy: - description: |- - UpdateStrategy - overrides default update strategy. - Available from operator v0.64.0 - enum: - - Recreate - - RollingUpdate - type: string - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useProxyProtocol: - description: |- - UseProxyProtocol enables proxy protocol for vmauth - https://www.haproxy.org/download/2.3/doc/proxy-protocol.txt - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - useVMConfigReloader: - description: |- - UseVMConfigReloader replaces prometheus-like config-reloader - with vm one. It uses secrets watch instead of file watch - which greatly increases speed of config updates - type: boolean - userNamespaceSelector: - description: |- - UserNamespaceSelector Namespaces to be selected for VMAuth discovery. - Works in combination with Selector. - NamespaceSelector nil - only objects at VMAuth namespace. - Selector nil - only objects at NamespaceSelector namespaces. - If both nil - behaviour controlled by selectAllByDefault - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - userSelector: - description: |- - UserSelector defines VMUser to be selected for config file generation. - Works in combination with NamespaceSelector. - NamespaceSelector nil - only objects at VMAuth namespace. - If both nil - behaviour controlled by selectAllByDefault - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that may - be accessed by any container in the pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - type: object - x-kubernetes-preserve-unknown-fields: true - status: - description: VMAuthStatus defines the observed state of VMAuth - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 - type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.18.0 - name: vmclusters.operator.victoriametrics.com -spec: - group: operator.victoriametrics.com - names: - kind: VMCluster - listKind: VMClusterList - plural: vmclusters - singular: vmcluster - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: replicas of VMInsert - jsonPath: .spec.vminsert.replicaCount - name: Insert Count - type: string - - description: replicas of VMStorage - jsonPath: .spec.vmstorage.replicaCount - name: Storage Count - type: string - - description: replicas of VMSelect - jsonPath: .spec.vmselect.replicaCount - name: Select Count - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - description: Current status of cluster - jsonPath: .status.updateStatus - name: Status - type: string - name: v1beta1 - schema: - openAPIV3Schema: - description: |- - VMCluster is fast, cost-effective and scalable time-series database. - Cluster version with - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VMClusterSpec defines the desired state of VMCluster - properties: - clusterDomainName: - description: |- - ClusterDomainName defines domain name suffix for in-cluster dns addresses - aka .cluster.local - used by vminsert and vmselect to build vmstorage address - type: string - clusterVersion: - description: |- - ClusterVersion defines default images tag for all components. - it can be overwritten with component specific image.tag value. - type: string - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - type: array - license: - description: |- - License allows to configure license key to be used for enterprise features. - Using license key is supported starting from VictoriaMetrics v1.94.0. - See [here](https://docs.victoriametrics.com/victoriametrics/enterprise/) - properties: - forceOffline: - description: Enforce offline verification of the license key. - type: boolean - key: - description: |- - Enterprise license key. This flag is available only in [VictoriaMetrics enterprise](https://docs.victoriametrics.com/victoriametrics/enterprise/). - To request a trial license, [go to](https://victoriametrics.com/products/enterprise/trial) - type: string - keyRef: - description: KeyRef is reference to secret with license key for - enterprise features. - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - reloadInterval: - description: Interval to be used for checking for license key - changes. Note that this is only applicable when using KeyRef. - type: string - type: object - managedMetadata: - description: |- - ManagedMetadata defines metadata that will be added to the all objects - created by operator for the given CustomResource - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - replicationFactor: - description: |- - ReplicationFactor defines how many copies of data make among - distinct storage nodes - format: int32 - type: integer - requestsLoadBalancer: - description: |- - RequestsLoadBalancer configures load-balancing for vminsert and vmselect requests. - It helps to evenly spread load across pods. - Usually it's not possible with Kubernetes TCP-based services. - See more [here](https://docs.victoriametrics.com/operator/resources/vmcluster/#requests-load-balancing) - properties: - disableInsertBalancing: - type: boolean - disableSelectBalancing: - type: boolean - enabled: - type: boolean - spec: - description: |- - VMAuthLoadBalancerSpec defines configuration spec for VMAuth used as load-balancer - for VMCluster component - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - retentionPeriod: - description: |- - RetentionPeriod defines how long to retain stored metrics, specified as a duration (e.g., "1d", "1w", "1m"). - Data with timestamps outside the RetentionPeriod is automatically deleted. The minimum allowed value is 1d, or 24h. - The default value is 1 (one month). - See [retention](https://docs.victoriametrics.com/victoriametrics/single-server-victoriametrics/#retention) docs for details. - pattern: ^[0-9]+(h|d|w|y)?$ - type: string - serviceAccountName: - description: |- - ServiceAccountName is the name of the ServiceAccount to use to run the - VMSelect, VMStorage and VMInsert Pods. - type: string - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - vminsert: - properties: - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - clusterNativeListenPort: - description: |- - ClusterNativePort for multi-level cluster setup. - More [details](https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/#multi-level-cluster-setup) - type: string - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: - type: string - type: array - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to - run within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: - x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. - properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this DNS resolver option's value. - type: string - type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application - container - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of - ConfigMaps or Secrets - properties: - configMapRef: - description: The ConfigMap to select from + restartPolicyRules: + items: + properties: + action: + type: string + exitCodes: + properties: + operator: + type: string + values: + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set + required: + - operator + type: object + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. + dnsPolicy: type: string - secretRef: - description: The Secret to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean + extraArgs: + additionalProperties: + type: string type: object - x-kubernetes-map-type: atomic - type: object - type: array - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. + extraEnvs: items: - type: string + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. + extraEnvsFrom: items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the - node network namespace - type: boolean - hpa: - description: HPA defines kubernetes PodAutoScaling configuration - version 2. - type: object - x-kubernetes-preserve-unknown-fields: true - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image + it's - repository if needed - type: string - tag: - description: Tag contains desired docker image version - type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - type: array - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to - run within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - insertPorts: - description: InsertPorts - additional listen ports for data ingestion. - properties: - graphitePort: - description: GraphitePort listen port - type: string - influxPort: - description: InfluxPort listen port - type: string - openTSDBHTTPPort: - description: OpenTSDBHTTPPort for http connections. - type: string - openTSDBPort: - description: OpenTSDBPort for tcp and udp listen - type: string - type: object - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logFormat: - description: |- - LogFormat for VMInsert to be configured with. - default or json - enum: - - default - - json - type: string - logLevel: - description: LogLevel for VMInsert to be configured with. - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - nodeSelector: - additionalProperties: - type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - podDisruptionBudget: - description: PodDisruptionBudget created by operator - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at most "maxUnavailable" pods selected by - "selector" are unavailable after the eviction, i.e. even in absence of - the evicted pod. For example, one can prevent all voluntary evictions - by specifying 0. This is a mutually exclusive setting with "minAvailable". - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at least "minAvailable" pods selected by - "selector" will still be available after the eviction, i.e. even in the - absence of the evicted pod. So for example you can prevent all voluntary - evictions by specifying "100%". - x-kubernetes-int-or-string: true - selectorLabels: - additionalProperties: - type: string - description: |- - replaces default labels selector generated by operator - it's useful when you need to create custom budget - type: object - unhealthyPodEvictionPolicy: - description: |- - UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods - - Valid policies are IfHealthyBudget and AlwaysAllow. - If no policy is specified, the default behavior will be used, - which corresponds to the IfHealthyBudget policy. - Available from operator v0.64.0 - enum: - - IfHealthyBudget - - AlwaysAllow - type: string - type: object - podMetadata: - description: PodMetadata configures Labels and Annotations which - are propagated to the VMInsert pods. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - port: - description: Port listen address - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods - type: string - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod - condition - properties: - conditionType: - description: ConditionType refers to a condition in the - pod's condition list with matching type. - type: string - required: - - conditionType - type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + image: properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. + pullPolicy: type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. + repository: type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - rollingUpdate: - description: RollingUpdate - overrides deployment update params. - properties: - maxSurge: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of pods that can be scheduled above the desired number of - pods. - Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - This can not be 0 if MaxUnavailable is 0. - Absolute number is calculated from percentage by rounding up. - Defaults to 25%. - Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when - the rolling update starts, such that the total number of old and new pods do not exceed - 130% of desired pods. Once old pods have been killed, - new ReplicaSet can be scaled up further, ensuring that total number of pods running - at any time during the update is at most 130% of desired pods. - x-kubernetes-int-or-string: true - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of pods that can be unavailable during the update. - Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - Absolute number is calculated from percentage by rounding down. - This can not be 0 if MaxSurge is 0. - Defaults to 25%. - Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods - immediately when the rolling update starts. Once new pods are ready, old ReplicaSet - can be scaled down further, followed by scaling up the new ReplicaSet, ensuring - that the total number of pods available at all times during the update is at - least 70% of desired pods. - x-kubernetes-int-or-string: true - type: object - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: - type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vminsert - VMServiceScrape spec - required: - - endpoints - type: object - x-kubernetes-preserve-unknown-fields: true - serviceSpec: - description: ServiceSpec that will be added to vminsert service - spec - properties: - metadata: - description: EmbeddedObjectMetadata defines objectMeta for - additional service. - properties: - annotations: - additionalProperties: + tag: type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations + type: object + imagePullSecrets: + items: + properties: + name: + default: "" + type: string type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + stopSignal: + type: string + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + restartPolicyRules: + items: + properties: + action: + type: string + exitCodes: + properties: + operator: + type: string + values: + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set + required: + - operator + type: object + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - spec: - description: |- - ServiceSpec describes the attributes that a user creates on a service. - More info: https://kubernetes.io/docs/concepts/services-networking/service/ - type: object - x-kubernetes-preserve-unknown-fields: true - useAsDefault: - description: |- - UseAsDefault applies changes from given service definition to the main object Service - Changing from headless service to clusterIP or loadbalancer may break cross-component communication - type: boolean - required: - - spec - type: object - startupProbe: - description: StartupProbe that will be added to CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container - graceful termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread - matching pods among the given topology. - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - updateStrategy: - description: UpdateStrategy - overrides default update strategy. - enum: - - Recreate - - RollingUpdate - type: string - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that - may be accessed by any container in the pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - type: object - vmselect: - description: VMSelect defines configuration section for vmselect components - of the victoria-metrics cluster - properties: - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - cacheMountPath: - description: |- - CacheMountPath allows to add cache persistent for VMSelect, - will use "/cache" as default if not specified. - type: string - claimTemplates: - description: ClaimTemplates allows adding additional VolumeClaimTemplates - for StatefulSet - items: - description: PersistentVolumeClaim is a user's request for and - claim to a persistent volume - type: object - type: array - clusterNativeListenPort: - description: |- - ClusterNativePort for multi-level cluster setup. - More [details](https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/#multi-level-cluster-setup) - type: string - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: - type: string - type: array - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to - run within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: - x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. + type: array + livenessProbe: properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this DNS resolver option's value. - type: string + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: + logFormat: + enum: + - default + - json type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application - container - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC type: string - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of - ConfigMaps or Secrets - properties: - configMapRef: - description: The ConfigMap to select from + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + podDisruptionBudget: properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from + podMetadata: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the Secret must be defined - type: boolean type: object - x-kubernetes-map-type: atomic - type: object - type: array - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. + port: type: string - required: - - ip - type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. + priorityClassName: + type: string + readinessGates: items: - type: string + properties: + conditionType: + type: string + required: + - conditionType + type: object type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the - node network namespace - type: boolean - hpa: - description: |- - Configures horizontal pod autoscaling. - Note, enabling this option disables vmselect to vmselect communication. In most cases it's not an issue. - type: object - x-kubernetes-preserve-unknown-fields: true - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image + it's - repository if needed - type: string - tag: - description: Tag contains desired docker image version - type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - type: array - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to - run within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logFormat: - description: |- - LogFormat for VMSelect to be configured with. - default or json - enum: - - default - - json - type: string - logLevel: - description: LogLevel for VMSelect to be configured with. - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - nodeSelector: - additionalProperties: - type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - persistentVolume: - description: |- - PersistentVolume - add persistent volume for cacheMountPath - its useful for persistent cache - use storage instead of persistentVolume. - properties: - disableMountSubPath: - description: |- - Deprecated: subPath usage will be disabled by default in a future release, this option will become unnecessary. - DisableMountSubPath allows to remove any subPath usage in volume mounts. - type: boolean - emptyDir: - description: |- - EmptyDirVolumeSource to be used by the Prometheus StatefulSets. If specified, used in place of any volumeClaimTemplate. More - info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir - properties: - medium: - description: |- - medium represents what type of storage medium should back this directory. - The default is "" which means to use the node's default medium. - Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: |- - sizeLimit is the total amount of local storage required for this EmptyDir volume. - The size limit is also applicable for memory medium. - The maximum usage on memory medium EmptyDir would be the minimum value between - the SizeLimit specified here and the sum of memory limits of all containers in a pod. - The default is nil which means that the limit is undefined. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - volumeClaimTemplate: - description: A PVC spec to be used by the StatefulSets/Deployments. - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - persistentVolumeClaimRetentionPolicy: - description: PersistentVolumeClaimRetentionPolicy allows configuration - of PVC retention policy - properties: - whenDeleted: - description: |- - WhenDeleted specifies what happens to PVCs created from StatefulSet - VolumeClaimTemplates when the StatefulSet is deleted. The default policy - of `Retain` causes PVCs to not be affected by StatefulSet deletion. The - `Delete` policy causes those PVCs to be deleted. - type: string - whenScaled: - description: |- - WhenScaled specifies what happens to PVCs created from StatefulSet - VolumeClaimTemplates when the StatefulSet is scaled down. The default - policy of `Retain` causes PVCs to not be affected by a scaledown. The - `Delete` policy causes the associated PVCs for any excess pods above - the replica count to be deleted. - type: string - type: object - podDisruptionBudget: - description: PodDisruptionBudget created by operator - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at most "maxUnavailable" pods selected by - "selector" are unavailable after the eviction, i.e. even in absence of - the evicted pod. For example, one can prevent all voluntary evictions - by specifying 0. This is a mutually exclusive setting with "minAvailable". - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at least "minAvailable" pods selected by - "selector" will still be available after the eviction, i.e. even in the - absence of the evicted pod. So for example you can prevent all voluntary - evictions by specifying "100%". - x-kubernetes-int-or-string: true - selectorLabels: - additionalProperties: - type: string - description: |- - replaces default labels selector generated by operator - it's useful when you need to create custom budget - type: object - unhealthyPodEvictionPolicy: - description: |- - UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods - - Valid policies are IfHealthyBudget and AlwaysAllow. - If no policy is specified, the default behavior will be used, - which corresponds to the IfHealthyBudget policy. - Available from operator v0.64.0 - enum: - - IfHealthyBudget - - AlwaysAllow - type: string - type: object - podMetadata: - description: PodMetadata configures Labels and Annotations which - are propagated to the VMSelect pods. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - port: - description: Port listen address - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods - type: string - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod - condition - properties: - conditionType: - description: ConditionType refers to a condition in the - pod's condition list with matching type. + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdate: + properties: + maxSurge: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + runtimeClassName: type: string - required: - - conditionType - type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. + schedulerName: + type: string + secrets: + items: + type: string + type: array + securityContext: properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - rollingUpdateStrategy: - description: |- - RollingUpdateStrategy defines strategy for application updates - Default is OnDelete, in this case operator handles update process - Can be changed for RollingUpdate - type: string - rollingUpdateStrategyBehavior: - description: |- - RollingUpdateStrategyBehavior defines customized behavior for rolling updates. - It applies if the RollingUpdateStrategy is set to OnDelete, which is the default. - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - MaxUnavailable defines the maximum number of pods that can be unavailable during the update. - It can be specified as an absolute number (e.g. 2) or a percentage of the total pods (e.g. "50%"). - For example, if set to 100%, all pods will be upgraded at once, minimizing downtime when needed. - x-kubernetes-int-or-string: true - type: object - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: - type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vmselect - VMServiceScrape spec - required: - - endpoints - type: object - x-kubernetes-preserve-unknown-fields: true - serviceSpec: - description: ServiceSpec that will be added to vmselect service - spec - properties: - metadata: - description: EmbeddedObjectMetadata defines objectMeta for - additional service. - properties: - annotations: - additionalProperties: + privileged: + type: boolean + procMount: type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxChangePolicy: type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - spec: - description: |- - ServiceSpec describes the attributes that a user creates on a service. - More info: https://kubernetes.io/docs/concepts/services-networking/service/ - type: object - x-kubernetes-preserve-unknown-fields: true - useAsDefault: - description: |- - UseAsDefault applies changes from given service definition to the main object Service - Changing from headless service to clusterIP or loadbalancer may break cross-component communication - type: boolean - required: - - spec - type: object - startupProbe: - description: StartupProbe that will be added to CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - storage: - description: |- - StorageSpec - add persistent volume claim for cacheMountPath - its needed for persistent cache - properties: - disableMountSubPath: - description: |- - Deprecated: subPath usage will be disabled by default in a future release, this option will become unnecessary. - DisableMountSubPath allows to remove any subPath usage in volume mounts. - type: boolean - emptyDir: - description: |- - EmptyDirVolumeSource to be used by the Prometheus StatefulSets. If specified, used in place of any volumeClaimTemplate. More - info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir - properties: - medium: - description: |- - medium represents what type of storage medium should back this directory. - The default is "" which means to use the node's default medium. - Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: |- - sizeLimit is the total amount of local storage required for this EmptyDir volume. - The size limit is also applicable for memory medium. - The maximum usage on memory medium EmptyDir would be the minimum value between - the SizeLimit specified here and the sum of memory limits of all containers in a pod. - The default is nil which means that the limit is undefined. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - volumeClaimTemplate: - description: A PVC spec to be used by the StatefulSets/Deployments. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - description: EmbeddedMetadata contains metadata relevant - to an EmbeddedResource. - properties: - annotations: - additionalProperties: + seLinuxOptions: + properties: + level: type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: + role: type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - spec: - description: |- - Spec defines the desired characteristics of a volume requested by a pod author. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: + type: type: string - type: array - x-kubernetes-list-type: atomic - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + supplementalGroupsPolicy: + type: string + sysctls: + items: properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being - referenced - type: string name: - description: Name is the name of resource being - referenced + type: string + value: type: string required: - - kind - - name + - name + - value type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + type: array + x-kubernetes-list-type: atomic + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + serviceScrapeSpec: + properties: + attach_metadata: + properties: + namespace: + type: boolean + node: + type: boolean + type: object + discoveryRole: + enum: + - endpoints + - service + - endpointslices + type: string + endpoints: + items: properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being - referenced + attach_metadata: + properties: + namespace: + type: boolean + node: + type: boolean + type: object + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + credentialsFile: + type: string + type: + type: string + type: object + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearerTokenFile: type: string - name: - description: Name is the name of resource being - referenced + bearerTokenSecret: + nullable: true + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + follow_redirects: + type: boolean + honorLabels: + type: boolean + honorTimestamps: + type: boolean + interval: type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + max_scrape_size: type: string - required: - - kind - - name - type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + metricRelabelConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: + additionalProperties: + type: string + type: object + proxy_url: + type: string + scopes: + items: + type: string + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url type: object - requests: + params: additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + items: + type: string + type: array type: object - type: object - selector: - description: selector is a label query over volumes - to consider for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label - selector requirements. The requirements are - ANDed. + path: + type: string + port: + type: string + proxyURL: + type: string + relabelConfigs: items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. properties: - key: - description: key is the label key that the - selector applies to. + action: type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: items: type: string type: array - x-kubernetes-list-type: atomic - required: - - key - - operator + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string type: object type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string or nil value indicates that no - VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, - this field can be reset to its previous value (including nil) to cancel the modification. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to - the PersistentVolume backing this claim. - type: string - type: object - status: - description: |- - Status represents the current information/status of a persistent volume claim. - Read-only. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims - properties: - accessModes: - description: |- - accessModes contains the actual access modes the volume backing the PVC has. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - x-kubernetes-list-type: atomic - allocatedResourceStatuses: - additionalProperties: - description: |- - When a controller receives persistentvolume claim update with ClaimResourceStatus for a resource - that it does not recognizes, then it should ignore that update and let other controllers - handle it. - type: string - description: "allocatedResourceStatuses stores status - of resource being resized for the given PVC.\nKey - names follow standard Kubernetes label syntax. Valid - values are either:\n\t* Un-prefixed keys:\n\t\t- - storage - the capacity of the volume.\n\t* Custom - resources must use implementation-defined prefixed - names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or - have kubernetes.io prefix are considered\nreserved - and hence may not be used.\n\nClaimResourceStatus - can be in any of following states:\n\t- ControllerResizeInProgress:\n\t\tState - set when resize controller starts resizing the volume - in control-plane.\n\t- ControllerResizeFailed:\n\t\tState - set when resize has failed in resize controller - with a terminal error.\n\t- NodeResizePending:\n\t\tState - set when resize controller has finished resizing - the volume but further resizing of\n\t\tvolume is - needed on the node.\n\t- NodeResizeInProgress:\n\t\tState - set when kubelet starts resizing the volume.\n\t- - NodeResizeFailed:\n\t\tState set when resizing has - failed in kubelet with a terminal error. Transient - errors don't set\n\t\tNodeResizeFailed.\nFor example: - if expanding a PVC for more capacity - this field - can be one of the following states:\n\t- pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"ControllerResizeFailed\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizePending\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeInProgress\"\n - pvc.status.allocatedResourceStatus['storage'] - = \"NodeResizeFailed\"\nWhen this field is not set, - it means that no resize operation is in progress - for the given PVC.\n\nA controller that receives - PVC update with previously unknown resourceName - or ClaimResourceStatus\nshould ignore the update - for the purpose it was designed. For example - a - controller that\nonly is responsible for resizing - capacity of the volume, should ignore PVC updates - that change other valid\nresources associated with - PVC.\n\nThis is an alpha field and requires enabling - RecoverVolumeExpansionFailure feature." - type: object - x-kubernetes-map-type: granular - allocatedResources: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: "allocatedResources tracks the resources - allocated to a PVC including its capacity.\nKey - names follow standard Kubernetes label syntax. Valid - values are either:\n\t* Un-prefixed keys:\n\t\t- - storage - the capacity of the volume.\n\t* Custom - resources must use implementation-defined prefixed - names such as \"example.com/my-custom-resource\"\nApart - from above values - keys that are unprefixed or - have kubernetes.io prefix are considered\nreserved - and hence may not be used.\n\nCapacity reported - here may be larger than the actual capacity when - a volume expansion operation\nis requested.\nFor - storage quota, the larger value from allocatedResources - and PVC.spec.resources is used.\nIf allocatedResources - is not set, PVC.spec.resources alone is used for - quota calculation.\nIf a volume expansion capacity - request is lowered, allocatedResources is only\nlowered - if there are no expansion operations in progress - and if the actual volume capacity\nis equal or lower - than the requested capacity.\n\nA controller that - receives PVC update with previously unknown resourceName\nshould - ignore the update for the purpose it was designed. - For example - a controller that\nonly is responsible - for resizing capacity of the volume, should ignore - PVC updates that change other valid\nresources associated - with PVC.\n\nThis is an alpha field and requires - enabling RecoverVolumeExpansionFailure feature." - type: object - capacity: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: capacity represents the actual resources - of the underlying volume. - type: object - conditions: - description: |- - conditions is the current Condition of persistent volume claim. If underlying persistent volume is being - resized then the Condition will be set to 'Resizing'. - items: - description: PersistentVolumeClaimCondition contains - details about state of pvc - properties: - lastProbeTime: - description: lastProbeTime is the time we probed - the condition. - format: date-time - type: string - lastTransitionTime: - description: lastTransitionTime is the time - the condition transitioned from one status - to another. - format: date-time - type: string - message: - description: message is the human-readable message - indicating details about last transition. - type: string - reason: - description: |- - reason is a unique, this should be a short, machine understandable string that gives the reason - for condition's last transition. If it reports "Resizing" that means the underlying - persistent volume is being resized. - type: string - status: - description: |- - Status is the status of the condition. - Can be True, False, Unknown. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=state%20of%20pvc-,conditions.status,-(string)%2C%20required - type: string - type: - description: |- - Type is the type of the condition. - More info: https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/persistent-volume-claim-v1/#:~:text=set%20to%20%27ResizeStarted%27.-,PersistentVolumeClaimCondition,-contains%20details%20about - type: string - required: - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - currentVolumeAttributesClassName: - description: |- - currentVolumeAttributesClassName is the current name of the VolumeAttributesClass the PVC is using. - When unset, there is no VolumeAttributeClass applied to this PersistentVolumeClaim - type: string - modifyVolumeStatus: - description: |- - ModifyVolumeStatus represents the status object of ControllerModifyVolume operation. - When this is unset, there is no ModifyVolume operation being attempted. - properties: - status: - description: "status is the status of the ControllerModifyVolume - operation. It can be in any of following states:\n - - Pending\n Pending indicates that the PersistentVolumeClaim - cannot be modified due to unmet requirements, - such as\n the specified VolumeAttributesClass - not existing.\n - InProgress\n InProgress - indicates that the volume is being modified.\n - - Infeasible\n Infeasible indicates that the - request has been rejected as invalid by the - CSI driver. To\n\t resolve the error, a valid - VolumeAttributesClass needs to be specified.\nNote: - New statuses can be added in the future. Consumers - should check for unknown statuses and fail appropriately." - type: string - targetVolumeAttributesClassName: - description: targetVolumeAttributesClassName is - the name of the VolumeAttributesClass the PVC - currently being reconciled + sampleLimit: + type: integer + scheme: + enum: + - http + - https + - HTTPS + - HTTP type: string - required: - - status - type: object - phase: - description: phase represents the current phase of - PersistentVolumeClaim. - type: string - type: object - type: object - type: object - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container - graceful termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread - matching pods among the given topology. - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that - may be accessed by any container in the pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - type: object - vmstorage: - properties: - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - claimTemplates: - description: ClaimTemplates allows adding additional VolumeClaimTemplates - for StatefulSet - items: - description: PersistentVolumeClaim is a user's request for and - claim to a persistent volume - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: - type: string - type: array - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to - run within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: - x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. - properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this DNS resolver option's value. + scrape_interval: + type: string + scrapeTimeout: + type: string + seriesLimit: + type: integer + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + vm_scrape_params: + properties: + disable_compression: + type: boolean + disable_keep_alive: + type: boolean + headers: + items: + type: string + type: array + no_stale_markers: + type: boolean + proxy_client_config: + properties: + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + bearer_token_file: + type: string + tls_config: + x-kubernetes-preserve-unknown-fields: true + type: object + scrape_align_interval: + type: string + scrape_offset: + type: string + stream_parse: + type: boolean + type: object + type: object + type: array + jobLabel: type: string - type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application - container - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of - ConfigMaps or Secrets - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + namespaceSelector: + properties: + any: + type: boolean + matchNames: + items: + type: string + type: array + type: object + podTargetLabels: + items: + type: string + type: array + sampleLimit: + type: integer + scrapeClass: type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + seriesLimit: + type: integer + targetLabels: + items: + type: string + type: array + required: + - endpoints type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from + serviceSpec: properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret must be defined + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + properties: + allocateLoadBalancerNodePorts: + type: boolean + clusterIP: + type: string + clusterIPs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + externalIPs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + externalName: + type: string + externalTrafficPolicy: + type: string + healthCheckNodePort: + format: int32 + type: integer + internalTrafficPolicy: + type: string + ipFamilies: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ipFamilyPolicy: + type: string + loadBalancerClass: + type: string + loadBalancerIP: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ports: + items: + properties: + appProtocol: + type: string + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + protocol: + default: TCP + type: string + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-map-keys: + - port + - protocol + x-kubernetes-list-type: map + publishNotReadyAddresses: + type: boolean + selector: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: atomic + sessionAffinity: + type: string + sessionAffinityConfig: + properties: + clientIP: + properties: + timeoutSeconds: + format: int32 + type: integer + type: object + type: object + trafficDistribution: + type: string + type: + type: string + type: object + useAsDefault: type: boolean + required: + - spec type: object - x-kubernetes-map-type: atomic - type: object - type: array - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the - node network namespace - type: boolean - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image + it's - repository if needed - type: string - tag: - description: Tag contains desired docker image version - type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - type: array - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to - run within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logFormat: - description: |- - LogFormat for VMStorage to be configured with. - default or json - enum: - - default - - json - type: string - logLevel: - description: LogLevel for VMStorage to be configured with. - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - maintenanceInsertNodeIDs: - description: |- - MaintenanceInsertNodeIDs - excludes given node ids from insert requests routing, must contain pod suffixes - for pod-0, id will be 0 and etc. - lets say, you have pod-0, pod-1, pod-2, pod-3. to exclude pod-0 and pod-3 from insert routing, define nodeIDs: [0,3]. - Useful at storage expanding, when you want to rebalance some data at cluster. - items: - format: int32 - type: integer - type: array - maintenanceSelectNodeIDs: - description: MaintenanceInsertNodeIDs - excludes given node ids - from select requests routing, must contain pod suffixes - for - pod-0, id will be 0 and etc. - items: - format: int32 - type: integer - type: array - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - nodeSelector: - additionalProperties: - type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - persistentVolumeClaimRetentionPolicy: - description: PersistentVolumeClaimRetentionPolicy allows configuration - of PVC retention policy - properties: - whenDeleted: - description: |- - WhenDeleted specifies what happens to PVCs created from StatefulSet - VolumeClaimTemplates when the StatefulSet is deleted. The default policy - of `Retain` causes PVCs to not be affected by StatefulSet deletion. The - `Delete` policy causes those PVCs to be deleted. - type: string - whenScaled: - description: |- - WhenScaled specifies what happens to PVCs created from StatefulSet - VolumeClaimTemplates when the StatefulSet is scaled down. The default - policy of `Retain` causes PVCs to not be affected by a scaledown. The - `Delete` policy causes the associated PVCs for any excess pods above - the replica count to be deleted. - type: string - type: object - podDisruptionBudget: - description: PodDisruptionBudget created by operator - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at most "maxUnavailable" pods selected by - "selector" are unavailable after the eviction, i.e. even in absence of - the evicted pod. For example, one can prevent all voluntary evictions - by specifying 0. This is a mutually exclusive setting with "minAvailable". - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at least "minAvailable" pods selected by - "selector" will still be available after the eviction, i.e. even in the - absence of the evicted pod. So for example you can prevent all voluntary - evictions by specifying "100%". - x-kubernetes-int-or-string: true - selectorLabels: - additionalProperties: - type: string - description: |- - replaces default labels selector generated by operator - it's useful when you need to create custom budget - type: object - unhealthyPodEvictionPolicy: - description: |- - UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods - - Valid policies are IfHealthyBudget and AlwaysAllow. - If no policy is specified, the default behavior will be used, - which corresponds to the IfHealthyBudget policy. - Available from operator v0.64.0 - enum: - - IfHealthyBudget - - AlwaysAllow - type: string - type: object - podMetadata: - description: PodMetadata configures Labels and Annotations which - are propagated to the VMStorage pods. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - port: - description: Port listen address - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods - type: string - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod - condition - properties: - conditionType: - description: ConditionType refers to a condition in the - pod's condition list with matching type. - type: string - required: - - conditionType - type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. + startupProbe: properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - rollingUpdateStrategy: - description: |- - RollingUpdateStrategy defines strategy for application updates - Default is OnDelete, in this case operator handles update process - Can be changed for RollingUpdate - type: string - rollingUpdateStrategyBehavior: - description: |- - RollingUpdateStrategyBehavior defines customized behavior for rolling updates. - It applies if the RollingUpdateStrategy is set to OnDelete, which is the default. - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - MaxUnavailable defines the maximum number of pods that can be unavailable during the update. - It can be specified as an absolute number (e.g. 2) or a percentage of the total pods (e.g. "50%"). - For example, if set to 100%, all pods will be upgraded at once, minimizing downtime when needed. - x-kubernetes-int-or-string: true - type: object - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: - type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vmstorage - VMServiceScrape spec - required: - - endpoints - type: object - x-kubernetes-preserve-unknown-fields: true - serviceSpec: - description: ServiceSpec that will be create additional service - for vmstorage - properties: - metadata: - description: EmbeddedObjectMetadata defines objectMeta for - additional service. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + updateStrategy: + enum: + - Recreate + - RollingUpdate + type: string + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + default: ext4 + type: string + kind: + type: string + readOnly: + default: false + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + properties: + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + wwids: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + image: + properties: + pullPolicy: + type: string + reference: + type: string + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + default: default + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + x-kubernetes-list-type: atomic + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podCertificate: + properties: + certificateChainPath: + type: string + credentialBundlePath: + type: string + keyPath: + type: string + keyType: + type: string + maxExpirationSeconds: + format: int32 + type: integer + signerName: + type: string + required: + - keyType + - signerName + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + x-kubernetes-list-type: atomic + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + default: /etc/ceph/keyring + type: string + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + pool: + default: rbd + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + default: admin + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + default: xfs + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + type: boolean + storageMode: + default: ThinProvisioned + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - spec: - description: |- - ServiceSpec describes the attributes that a user creates on a service. - More info: https://kubernetes.io/docs/concepts/services-networking/service/ - type: object - x-kubernetes-preserve-unknown-fields: true - useAsDefault: - description: |- - UseAsDefault applies changes from given service definition to the main object Service - Changing from headless service to clusterIP or loadbalancer may break cross-component communication - type: boolean - required: - - spec - type: object - startupProbe: - description: StartupProbe that will be added to CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - storage: - description: |- - Storage - add persistent volume for StorageDataPath - its useful for persistent cache - properties: - disableMountSubPath: - description: |- - Deprecated: subPath usage will be disabled by default in a future release, this option will become unnecessary. - DisableMountSubPath allows to remove any subPath usage in volume mounts. - type: boolean - emptyDir: - description: |- - EmptyDirVolumeSource to be used by the Prometheus StatefulSets. If specified, used in place of any volumeClaimTemplate. More - info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir - properties: - medium: - description: |- - medium represents what type of storage medium should back this directory. - The default is "" which means to use the node's default medium. - Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: |- - sizeLimit is the total amount of local storage required for this EmptyDir volume. - The size limit is also applicable for memory medium. - The maximum usage on memory medium EmptyDir would be the minimum value between - the SizeLimit specified here and the sum of memory limits of all containers in a pod. - The default is nil which means that the limit is undefined. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - volumeClaimTemplate: - description: A PVC spec to be used by the StatefulSets/Deployments. - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - storageDataPath: - description: StorageDataPath - path to storage data - type: string - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container - graceful termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string + type: array type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread - matching pods among the given topology. - required: - - maxSkew - - topologyKey - - whenUnsatisfiable + type: object + zoneUpdatePause: + type: string + zones: + properties: + globalOverrideSpec: type: object x-kubernetes-preserve-unknown-fields: true - type: array - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - vmBackup: - description: VMBackup configuration for backup - properties: - acceptEULA: - description: |- - AcceptEULA accepts enterprise feature usage, must be set to true. - otherwise backupmanager cannot be added to single/cluster version. - https://victoriametrics.com/legal/esa/ - Deprecated: use license.key or license.keyRef instead - type: boolean - concurrency: - description: Defines number of concurrent workers. Higher - concurrency may reduce backup duration (default 10) - format: int32 - type: integer - credentialsSecret: - description: |- - CredentialsSecret is secret in the same namespace for access to remote storage - The secret is mounted into /etc/vm/creds. + vmclusters: + items: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - customS3Endpoint: - description: Custom S3 endpoint for use with S3-compatible - storages (e.g. MinIO). S3 is used if not set - type: string - destination: - description: Defines destination for backup - type: string - destinationDisableSuffixAdd: - description: |- - DestinationDisableSuffixAdd - disables suffix adding for cluster version backups - each vmstorage backup must have unique backup folder - so operator adds POD_NAME as suffix for backup destination folder. - type: boolean - disableDaily: - description: Defines if daily backups disabled (default false) - type: boolean - disableHourly: - description: Defines if hourly backups disabled (default false) - type: boolean - disableMonthly: - description: Defines if monthly backups disabled (default - false) - type: boolean - disableWeekly: - description: Defines if weekly backups disabled (default false) - type: boolean - extraArgs: - additionalProperties: - type: string - description: extra args like maxBytesPerSecond default 0 - type: object - extraEnvs: - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + overrideSpec: + type: object + x-kubernetes-preserve-unknown-fields: true + ref: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + spec: + properties: + clusterDomainName: + type: string + clusterVersion: + type: string + imagePullSecrets: + items: properties: - key: - description: The key to select. + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + license: + properties: + forceOffline: + type: boolean + key: + type: string + keyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + reloadInterval: + type: string + type: object + managedMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + paused: + type: boolean + replicationFactor: + format: int32 + type: integer + requestsLoadBalancer: + properties: + disableInsertBalancing: + type: boolean + disableSelectBalancing: + type: boolean + enabled: + type: boolean + spec: + properties: + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + configMaps: + items: + type: string + type: array + containers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + stopSignal: + type: string + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + restartPolicyRules: + items: + properties: + action: + type: string + exitCodes: + properties: + operator: + type: string + values: + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set + required: + - operator + type: object + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + stopSignal: + type: string + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + restartPolicyRules: + items: + properties: + action: + type: string + exitCodes: + properties: + operator: + type: string + values: + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set + required: + - operator + type: object + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + logFormat: + enum: + - default + - json + type: string + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + podDisruptionBudget: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow + type: string + type: object + podMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + port: + type: string + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdate: + properties: + maxSurge: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + runtimeClassName: + type: string + schedulerName: + type: string + secrets: + items: + type: string + type: array + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxChangePolicy: + type: string + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + supplementalGroupsPolicy: + type: string + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + serviceScrapeSpec: + properties: + attach_metadata: + properties: + namespace: + type: boolean + node: + type: boolean + type: object + discoveryRole: + enum: + - endpoints + - service + - endpointslices + type: string + endpoints: + items: + properties: + attach_metadata: + properties: + namespace: + type: boolean + node: + type: boolean + type: object + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + credentialsFile: + type: string + type: + type: string + type: object + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearerTokenFile: + type: string + bearerTokenSecret: + nullable: true + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + follow_redirects: + type: boolean + honorLabels: + type: boolean + honorTimestamps: + type: boolean + interval: + type: string + max_scrape_size: + type: string + metricRelabelConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: + additionalProperties: + type: string + type: object + proxy_url: + type: string + scopes: + items: + type: string + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url + type: object + params: + additionalProperties: + items: + type: string + type: array + type: object + path: + type: string + port: + type: string + proxyURL: + type: string + relabelConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + sampleLimit: + type: integer + scheme: + enum: + - http + - https + - HTTPS + - HTTP + type: string + scrape_interval: + type: string + scrapeTimeout: + type: string + seriesLimit: + type: integer + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + vm_scrape_params: + properties: + disable_compression: + type: boolean + disable_keep_alive: + type: boolean + headers: + items: + type: string + type: array + no_stale_markers: + type: boolean + proxy_client_config: + properties: + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + bearer_token_file: + type: string + tls_config: + x-kubernetes-preserve-unknown-fields: true + type: object + scrape_align_interval: + type: string + scrape_offset: + type: string + stream_parse: + type: boolean + type: object + type: object + type: array + jobLabel: + type: string + namespaceSelector: + properties: + any: + type: boolean + matchNames: + items: + type: string + type: array + type: object + podTargetLabels: + items: + type: string + type: array + sampleLimit: + type: integer + scrapeClass: + type: string + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + seriesLimit: + type: integer + targetLabels: + items: + type: string + type: array + required: + - endpoints + type: object + serviceSpec: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + properties: + allocateLoadBalancerNodePorts: + type: boolean + clusterIP: + type: string + clusterIPs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + externalIPs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + externalName: + type: string + externalTrafficPolicy: + type: string + healthCheckNodePort: + format: int32 + type: integer + internalTrafficPolicy: + type: string + ipFamilies: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ipFamilyPolicy: + type: string + loadBalancerClass: + type: string + loadBalancerIP: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ports: + items: + properties: + appProtocol: + type: string + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + protocol: + default: TCP + type: string + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-map-keys: + - port + - protocol + x-kubernetes-list-type: map + publishNotReadyAddresses: + type: boolean + selector: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: atomic + sessionAffinity: + type: string + sessionAffinityConfig: + properties: + clientIP: + properties: + timeoutSeconds: + format: int32 + type: integer + type: object + type: object + trafficDistribution: + type: string + type: + type: string + type: object + useAsDefault: + type: boolean + required: + - spec + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + updateStrategy: + enum: + - Recreate + - RollingUpdate + type: string + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + default: ext4 + type: string + kind: + type: string + readOnly: + default: false + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + properties: + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + wwids: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + image: + properties: + pullPolicy: + type: string + reference: + type: string + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + default: default + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + x-kubernetes-list-type: atomic + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podCertificate: + properties: + certificateChainPath: + type: string + credentialBundlePath: + type: string + keyPath: + type: string + keyType: + type: string + maxExpirationSeconds: + format: int32 + type: integer + signerName: + type: string + required: + - keyType + - signerName + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + x-kubernetes-list-type: atomic + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + default: /etc/ceph/keyring + type: string + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + pool: + default: rbd + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + default: admin + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + default: xfs + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + type: boolean + storageMode: + default: ThinProvisioned + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object + type: object + retentionPeriod: + pattern: ^[0-9]+(h|d|w|y)?$ + type: string + serviceAccountName: + type: string + useStrictSecurity: + type: boolean + vminsert: + properties: + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + clusterNativeListenPort: + type: string + configMaps: + items: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: array + containers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + stopSignal: + type: string + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + restartPolicyRules: + items: + properties: + action: + type: string + exitCodes: + properties: + operator: + type: string + values: + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set + required: + - operator + type: object + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + hpa: + properties: + behaviour: + properties: + scaleDown: + properties: + policies: + items: + properties: + periodSeconds: + format: int32 + type: integer + type: + type: string + value: + format: int32 + type: integer + required: + - periodSeconds + - type + - value + type: object + type: array + x-kubernetes-list-type: atomic + selectPolicy: + type: string + stabilizationWindowSeconds: + format: int32 + type: integer + tolerance: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + scaleUp: + properties: + policies: + items: + properties: + periodSeconds: + format: int32 + type: integer + type: + type: string + value: + format: int32 + type: integer + required: + - periodSeconds + - type + - value + type: object + type: array + x-kubernetes-list-type: atomic + selectPolicy: + type: string + stabilizationWindowSeconds: + format: int32 + type: integer + tolerance: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + maxReplicas: + format: int32 + type: integer + metrics: + items: + properties: + containerResource: + properties: + container: + type: string + name: + type: string + target: + properties: + averageUtilization: + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + type: string + value: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - container + - name + - target + type: object + external: + properties: + metric: + properties: + name: + type: string + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + required: + - name + type: object + target: + properties: + averageUtilization: + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + type: string + value: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - metric + - target + type: object + object: + properties: + describedObject: + properties: + apiVersion: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + metric: + properties: + name: + type: string + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + required: + - name + type: object + target: + properties: + averageUtilization: + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + type: string + value: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - describedObject + - metric + - target + type: object + pods: + properties: + metric: + properties: + name: + type: string + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + required: + - name + type: object + target: + properties: + averageUtilization: + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + type: string + value: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - metric + - target + type: object + resource: + properties: + name: + type: string + target: + properties: + averageUtilization: + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + type: string + value: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - name + - target + type: object + type: + type: string + required: + - type + type: object + type: array + minReplicas: + format: int32 + type: integer + type: object + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + stopSignal: + type: string + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + restartPolicyRules: + items: + properties: + action: + type: string + exitCodes: + properties: + operator: + type: string + values: + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set + required: + - operator + type: object + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + insertPorts: + properties: + graphitePort: + type: string + influxPort: + type: string + openTSDBHTTPPort: + type: string + openTSDBPort: + type: string + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + logFormat: + enum: + - default + - json + type: string + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: type: string - optional: - description: Specify whether the ConfigMap or - its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: |- - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". + type: object + paused: + type: boolean + podDisruptionBudget: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow + type: string + type: object + podMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + port: + type: string + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdate: + properties: + maxSurge: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + runtimeClassName: + type: string + schedulerName: + type: string + secrets: + items: type: string - fieldPath: - description: Path of the field to select in - the specified API version. + type: array + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxChangePolicy: + type: string + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + supplementalGroupsPolicy: + type: string + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + serviceScrapeSpec: + properties: + attach_metadata: + properties: + namespace: + type: boolean + node: + type: boolean + type: object + discoveryRole: + enum: + - endpoints + - service + - endpointslices + type: string + endpoints: + items: + properties: + attach_metadata: + properties: + namespace: + type: boolean + node: + type: boolean + type: object + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + credentialsFile: + type: string + type: + type: string + type: object + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearerTokenFile: + type: string + bearerTokenSecret: + nullable: true + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + follow_redirects: + type: boolean + honorLabels: + type: boolean + honorTimestamps: + type: boolean + interval: + type: string + max_scrape_size: + type: string + metricRelabelConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: + additionalProperties: + type: string + type: object + proxy_url: + type: string + scopes: + items: + type: string + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url + type: object + params: + additionalProperties: + items: + type: string + type: array + type: object + path: + type: string + port: + type: string + proxyURL: + type: string + relabelConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + sampleLimit: + type: integer + scheme: + enum: + - http + - https + - HTTPS + - HTTP + type: string + scrape_interval: + type: string + scrapeTimeout: + type: string + seriesLimit: + type: integer + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + vm_scrape_params: + properties: + disable_compression: + type: boolean + disable_keep_alive: + type: boolean + headers: + items: + type: string + type: array + no_stale_markers: + type: boolean + proxy_client_config: + properties: + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + bearer_token_file: + type: string + tls_config: + x-kubernetes-preserve-unknown-fields: true + type: object + scrape_align_interval: + type: string + scrape_offset: + type: string + stream_parse: + type: boolean + type: object + type: object + type: array + jobLabel: + type: string + namespaceSelector: + properties: + any: + type: boolean + matchNames: + items: + type: string + type: array + type: object + podTargetLabels: + items: + type: string + type: array + sampleLimit: + type: integer + scrapeClass: + type: string + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + seriesLimit: + type: integer + targetLabels: + items: + type: string + type: array + required: + - endpoints + type: object + serviceSpec: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + properties: + allocateLoadBalancerNodePorts: + type: boolean + clusterIP: + type: string + clusterIPs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + externalIPs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + externalName: + type: string + externalTrafficPolicy: + type: string + healthCheckNodePort: + format: int32 + type: integer + internalTrafficPolicy: + type: string + ipFamilies: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ipFamilyPolicy: + type: string + loadBalancerClass: + type: string + loadBalancerIP: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ports: + items: + properties: + appProtocol: + type: string + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + protocol: + default: TCP + type: string + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-map-keys: + - port + - protocol + x-kubernetes-list-type: map + publishNotReadyAddresses: + type: boolean + selector: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: atomic + sessionAffinity: + type: string + sessionAffinityConfig: + properties: + clientIP: + properties: + timeoutSeconds: + format: int32 + type: integer + type: object + type: object + trafficDistribution: + type: string + type: + type: string + type: object + useAsDefault: + type: boolean + required: + - spec + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + updateStrategy: + enum: + - Recreate + - RollingUpdate + type: string + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + default: ext4 + type: string + kind: + type: string + readOnly: + default: false + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + properties: + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + wwids: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + image: + properties: + pullPolicy: + type: string + reference: + type: string + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + default: default + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + x-kubernetes-list-type: atomic + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podCertificate: + properties: + certificateChainPath: + type: string + credentialBundlePath: + type: string + keyPath: + type: string + keyType: + type: string + maxExpirationSeconds: + format: int32 + type: integer + signerName: + type: string + required: + - keyType + - signerName + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + x-kubernetes-list-type: atomic + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + default: /etc/ceph/keyring + type: string + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + pool: + default: rbd + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + default: admin + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + default: xfs + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + type: boolean + storageMode: + default: ThinProvisioned + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object + vmselect: + properties: + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + cacheMountPath: + type: string + claimTemplates: + items: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + status: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + allocatedResourceStatuses: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + conditions: + items: + properties: + lastProbeTime: + format: date-time + type: string + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentVolumeAttributesClassName: + type: string + modifyVolumeStatus: + properties: + status: + type: string + targetVolumeAttributesClassName: + type: string + required: + - status + type: object + phase: + type: string + type: object + type: object + type: array + clusterNativeListenPort: + type: string + configMaps: + items: type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - fileKeyRef: - description: |- - FileKeyRef selects a key of the env file. - Requires the EnvFiles feature gate to be enabled. - properties: - key: - description: |- - The key within the env file. An invalid key will prevent the pod from starting. - The keys defined within a source may consist of any printable ASCII characters except '='. - During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + type: array + containers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + stopSignal: + type: string + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + restartPolicyRules: + items: + properties: + action: + type: string + exitCodes: + properties: + operator: + type: string + values: + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set + required: + - operator + type: object + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + extraArgs: + additionalProperties: type: string - optional: - default: false - description: |- - Specify whether the file or its key must be defined. If the file or key - does not exist, then the env var is not published. - If optional is set to true and the specified key does not exist, - the environment variable will not be set in the Pod's containers. - - If optional is set to false and the specified key does not exist, - an error will be returned during Pod creation. - type: boolean - path: - description: |- - The path within the volume from which to select the file. - Must be relative and may not contain the '..' path or start with '..'. + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + hpa: + properties: + behaviour: + properties: + scaleDown: + properties: + policies: + items: + properties: + periodSeconds: + format: int32 + type: integer + type: + type: string + value: + format: int32 + type: integer + required: + - periodSeconds + - type + - value + type: object + type: array + x-kubernetes-list-type: atomic + selectPolicy: + type: string + stabilizationWindowSeconds: + format: int32 + type: integer + tolerance: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + scaleUp: + properties: + policies: + items: + properties: + periodSeconds: + format: int32 + type: integer + type: + type: string + value: + format: int32 + type: integer + required: + - periodSeconds + - type + - value + type: object + type: array + x-kubernetes-list-type: atomic + selectPolicy: + type: string + stabilizationWindowSeconds: + format: int32 + type: integer + tolerance: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + maxReplicas: + format: int32 + type: integer + metrics: + items: + properties: + containerResource: + properties: + container: + type: string + name: + type: string + target: + properties: + averageUtilization: + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + type: string + value: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - container + - name + - target + type: object + external: + properties: + metric: + properties: + name: + type: string + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + required: + - name + type: object + target: + properties: + averageUtilization: + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + type: string + value: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - metric + - target + type: object + object: + properties: + describedObject: + properties: + apiVersion: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + metric: + properties: + name: + type: string + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + required: + - name + type: object + target: + properties: + averageUtilization: + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + type: string + value: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - describedObject + - metric + - target + type: object + pods: + properties: + metric: + properties: + name: + type: string + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + required: + - name + type: object + target: + properties: + averageUtilization: + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + type: string + value: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - metric + - target + type: object + resource: + properties: + name: + type: string + target: + properties: + averageUtilization: + format: int32 + type: integer + averageValue: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: + type: string + value: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + required: + - type + type: object + required: + - name + - target + type: object + type: + type: string + required: + - type + type: object + type: array + minReplicas: + format: int32 + type: integer + type: object + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + stopSignal: + type: string + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + restartPolicyRules: + items: + properties: + action: + type: string + exitCodes: + properties: + operator: + type: string + values: + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set + required: + - operator + type: object + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + logFormat: + enum: + - default + - json + type: string + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: type: string - volumeName: - description: The name of the volume mount containing - the env file. + type: object + paused: + type: boolean + persistentVolume: + properties: + disableMountSubPath: + type: boolean + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + volumeClaimTemplate: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + status: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + allocatedResourceStatuses: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + conditions: + items: + properties: + lastProbeTime: + format: date-time + type: string + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentVolumeAttributesClassName: + type: string + modifyVolumeStatus: + properties: + status: + type: string + targetVolumeAttributesClassName: + type: string + required: + - status + type: object + phase: + type: string + type: object + type: object + type: object + persistentVolumeClaimRetentionPolicy: + properties: + whenDeleted: + type: string + whenScaled: + type: string + type: object + podDisruptionBudget: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow + type: string + type: object + podMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + port: + type: string + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdateStrategy: + type: string + rollingUpdateStrategyBehavior: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + runtimeClassName: + type: string + schedulerName: + type: string + secrets: + items: type: string - required: - - key - - path - - volumeName - type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. - properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' + type: array + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxChangePolicy: + type: string + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + supplementalGroupsPolicy: + type: string + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + serviceScrapeSpec: + properties: + attach_metadata: + properties: + namespace: + type: boolean + node: + type: boolean + type: object + discoveryRole: + enum: + - endpoints + - service + - endpointslices + type: string + endpoints: + items: + properties: + attach_metadata: + properties: + namespace: + type: boolean + node: + type: boolean + type: object + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + credentialsFile: + type: string + type: + type: string + type: object + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearerTokenFile: + type: string + bearerTokenSecret: + nullable: true + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + follow_redirects: + type: boolean + honorLabels: + type: boolean + honorTimestamps: + type: boolean + interval: + type: string + max_scrape_size: + type: string + metricRelabelConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: + additionalProperties: + type: string + type: object + proxy_url: + type: string + scopes: + items: + type: string + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url + type: object + params: + additionalProperties: + items: + type: string + type: array + type: object + path: + type: string + port: + type: string + proxyURL: + type: string + relabelConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + sampleLimit: + type: integer + scheme: + enum: + - http + - https + - HTTPS + - HTTP + type: string + scrape_interval: + type: string + scrapeTimeout: + type: string + seriesLimit: + type: integer + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + vm_scrape_params: + properties: + disable_compression: + type: boolean + disable_keep_alive: + type: boolean + headers: + items: + type: string + type: array + no_stale_markers: + type: boolean + proxy_client_config: + properties: + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + bearer_token_file: + type: string + tls_config: + x-kubernetes-preserve-unknown-fields: true + type: object + scrape_align_interval: + type: string + scrape_offset: + type: string + stream_parse: + type: boolean + type: object + type: object + type: array + jobLabel: + type: string + namespaceSelector: + properties: + any: + type: boolean + matchNames: + items: + type: string + type: array + type: object + podTargetLabels: + items: + type: string + type: array + sampleLimit: + type: integer + scrapeClass: + type: string + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + seriesLimit: + type: integer + targetLabels: + items: + type: string + type: array + required: + - endpoints + type: object + serviceSpec: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + properties: + allocateLoadBalancerNodePorts: + type: boolean + clusterIP: + type: string + clusterIPs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + externalIPs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + externalName: + type: string + externalTrafficPolicy: + type: string + healthCheckNodePort: + format: int32 + type: integer + internalTrafficPolicy: + type: string + ipFamilies: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ipFamilyPolicy: + type: string + loadBalancerClass: + type: string + loadBalancerIP: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ports: + items: + properties: + appProtocol: + type: string + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + protocol: + default: TCP + type: string + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-map-keys: + - port + - protocol + x-kubernetes-list-type: map + publishNotReadyAddresses: + type: boolean + selector: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: atomic + sessionAffinity: + type: string + sessionAffinityConfig: + properties: + clientIP: + properties: + timeoutSeconds: + format: int32 + type: integer + type: object + type: object + trafficDistribution: + type: string + type: + type: string + type: object + useAsDefault: + type: boolean + required: + - spec + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + storage: + properties: + disableMountSubPath: + type: boolean + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + volumeClaimTemplate: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + status: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + allocatedResourceStatuses: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + conditions: + items: + properties: + lastProbeTime: + format: date-time + type: string + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentVolumeAttributesClassName: + type: string + modifyVolumeStatus: + properties: + status: + type: string + targetVolumeAttributesClassName: + type: string + required: + - status + type: object + phase: + type: string + type: object + type: object + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + default: ext4 + type: string + kind: + type: string + readOnly: + default: false + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + properties: + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + wwids: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + image: + properties: + pullPolicy: + type: string + reference: + type: string + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + default: default + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + x-kubernetes-list-type: atomic + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podCertificate: + properties: + certificateChainPath: + type: string + credentialBundlePath: + type: string + keyPath: + type: string + keyType: + type: string + maxExpirationSeconds: + format: int32 + type: integer + signerName: + type: string + required: + - keyType + - signerName + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + x-kubernetes-list-type: atomic + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + default: /etc/ceph/keyring + type: string + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + pool: + default: rbd + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + default: admin + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + default: xfs + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + type: boolean + storageMode: + default: ThinProvisioned + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object + vmstorage: + properties: + affinity: + properties: + nodeAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + preference: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + weight: + format: int32 + type: integer + required: + - preference + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + properties: + nodeSelectorTerms: + items: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchFields: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + type: object + x-kubernetes-map-type: atomic + type: array + x-kubernetes-list-type: atomic + required: + - nodeSelectorTerms + type: object + x-kubernetes-map-type: atomic + type: object + podAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podAntiAffinity: + properties: + preferredDuringSchedulingIgnoredDuringExecution: + items: + properties: + podAffinityTerm: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + weight: + format: int32 + type: integer + required: + - podAffinityTerm + - weight + type: object + type: array + x-kubernetes-list-type: atomic + requiredDuringSchedulingIgnoredDuringExecution: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + mismatchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + namespaceSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + namespaces: + items: + type: string + type: array + x-kubernetes-list-type: atomic + topologyKey: + type: string + required: + - topologyKey + type: object + type: array + x-kubernetes-list-type: atomic + type: object + type: object + claimTemplates: + items: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + status: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + allocatedResourceStatuses: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + conditions: + items: + properties: + lastProbeTime: + format: date-time + type: string + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentVolumeAttributesClassName: + type: string + modifyVolumeStatus: + properties: + status: + type: string + targetVolumeAttributesClassName: + type: string + required: + - status + type: object + phase: + type: string + type: object + type: object + type: array + configMaps: + items: type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of - the exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' + type: array + containers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + stopSignal: + type: string + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + restartPolicyRules: + items: + properties: + action: + type: string + exitCodes: + properties: + operator: + type: string + values: + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set + required: + - operator + type: object + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + extraArgs: + additionalProperties: type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + properties: + args: + items: + type: string + type: array + x-kubernetes-list-type: atomic + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + env: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + envFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + x-kubernetes-list-type: atomic + image: + type: string + imagePullPolicy: + type: string + lifecycle: + properties: + postStart: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + preStop: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + sleep: + properties: + seconds: + format: int64 + type: integer + required: + - seconds + type: object + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: object + stopSignal: + type: string + type: object + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + name: + type: string + ports: + items: + properties: + containerPort: + format: int32 + type: integer + hostIP: + type: string + hostPort: + format: int32 + type: integer + name: + type: string + protocol: + default: TCP + type: string + required: + - containerPort + type: object + type: array + x-kubernetes-list-map-keys: + - containerPort + - protocol + x-kubernetes-list-type: map + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + resizePolicy: + items: + properties: + resourceName: + type: string + restartPolicy: + type: string + required: + - resourceName + - restartPolicy + type: object + type: array + x-kubernetes-list-type: atomic + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restartPolicy: + type: string + restartPolicyRules: + items: + properties: + action: + type: string + exitCodes: + properties: + operator: + type: string + values: + items: + format: int32 + type: integer + type: array + x-kubernetes-list-type: set + required: + - operator + type: object + required: + - action + type: object + type: array + x-kubernetes-list-type: atomic + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + stdin: + type: boolean + stdinOnce: + type: boolean + terminationMessagePath: + type: string + terminationMessagePolicy: + type: string + tty: + type: boolean + volumeDevices: + items: + properties: + devicePath: + type: string + name: + type: string + required: + - devicePath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - devicePath + x-kubernetes-list-type: map + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + x-kubernetes-list-map-keys: + - mountPath + x-kubernetes-list-type: map + workingDir: + type: string + required: + - name + type: object + type: array + livenessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + logFormat: + enum: + - default + - json + type: string + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + maintenanceInsertNodeIDs: + items: + format: int32 + type: integer + type: array + maintenanceSelectNodeIDs: + items: + format: int32 + type: integer + type: array + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: object + paused: + type: boolean + persistentVolumeClaimRetentionPolicy: + properties: + whenDeleted: + type: string + whenScaled: + type: string + type: object + podDisruptionBudget: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow + type: string + type: object + podMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + port: + type: string + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + readinessProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdateStrategy: + type: string + rollingUpdateStrategyBehavior: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + runtimeClassName: + type: string + schedulerName: + type: string + secrets: + items: type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set - of ConfigMaps or Secrets - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap must - be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret must be - defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - image: - description: Image - docker image settings for VMBackuper - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image - + it's repository if needed - type: string - tag: - description: Tag contains desired docker image version - type: string - type: object - logFormat: - description: |- - LogFormat for VMBackup to be configured with. - default or json - enum: - - default - - json - type: string - logLevel: - description: LogLevel for VMBackup to be configured with. - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - port: - description: Port for health check connections - type: string - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - restore: - description: |- - Restore Allows to enable restore options for pod - Read [more](https://docs.victoriametrics.com/victoriametrics/vmbackupmanager/#restore-commands) - properties: - onStart: - description: OnStart defines configuration for restore - on pod start - properties: - enabled: - description: Enabled defines if restore on start enabled - type: boolean + type: array + securityContext: + properties: + allowPrivilegeEscalation: + type: boolean + appArmorProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + capabilities: + properties: + add: + items: + type: string + type: array + x-kubernetes-list-type: atomic + drop: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + fsGroup: + format: int64 + type: integer + fsGroupChangePolicy: + type: string + privileged: + type: boolean + procMount: + type: string + readOnlyRootFilesystem: + type: boolean + runAsGroup: + format: int64 + type: integer + runAsNonRoot: + type: boolean + runAsUser: + format: int64 + type: integer + seLinuxChangePolicy: + type: string + seLinuxOptions: + properties: + level: + type: string + role: + type: string + type: + type: string + user: + type: string + type: object + seccompProfile: + properties: + localhostProfile: + type: string + type: + type: string + required: + - type + type: object + supplementalGroups: + items: + format: int64 + type: integer + type: array + x-kubernetes-list-type: atomic + supplementalGroupsPolicy: + type: string + sysctls: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + windowsOptions: + properties: + gmsaCredentialSpec: + type: string + gmsaCredentialSpecName: + type: string + hostProcess: + type: boolean + runAsUserName: + type: string + type: object + type: object + serviceScrapeSpec: + properties: + attach_metadata: + properties: + namespace: + type: boolean + node: + type: boolean + type: object + discoveryRole: + enum: + - endpoints + - service + - endpointslices + type: string + endpoints: + items: + properties: + attach_metadata: + properties: + namespace: + type: boolean + node: + type: boolean + type: object + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + credentialsFile: + type: string + type: + type: string + type: object + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearerTokenFile: + type: string + bearerTokenSecret: + nullable: true + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + follow_redirects: + type: boolean + honorLabels: + type: boolean + honorTimestamps: + type: boolean + interval: + type: string + max_scrape_size: + type: string + metricRelabelConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: + additionalProperties: + type: string + type: object + proxy_url: + type: string + scopes: + items: + type: string + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url + type: object + params: + additionalProperties: + items: + type: string + type: array + type: object + path: + type: string + port: + type: string + proxyURL: + type: string + relabelConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + sampleLimit: + type: integer + scheme: + enum: + - http + - https + - HTTPS + - HTTP + type: string + scrape_interval: + type: string + scrapeTimeout: + type: string + seriesLimit: + type: integer + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + vm_scrape_params: + properties: + disable_compression: + type: boolean + disable_keep_alive: + type: boolean + headers: + items: + type: string + type: array + no_stale_markers: + type: boolean + proxy_client_config: + properties: + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + bearer_token_file: + type: string + tls_config: + x-kubernetes-preserve-unknown-fields: true + type: object + scrape_align_interval: + type: string + scrape_offset: + type: string + stream_parse: + type: boolean + type: object + type: object + type: array + jobLabel: + type: string + namespaceSelector: + properties: + any: + type: boolean + matchNames: + items: + type: string + type: array + type: object + podTargetLabels: + items: + type: string + type: array + sampleLimit: + type: integer + scrapeClass: + type: string + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + seriesLimit: + type: integer + targetLabels: + items: + type: string + type: array + required: + - endpoints + type: object + serviceSpec: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + properties: + allocateLoadBalancerNodePorts: + type: boolean + clusterIP: + type: string + clusterIPs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + externalIPs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + externalName: + type: string + externalTrafficPolicy: + type: string + healthCheckNodePort: + format: int32 + type: integer + internalTrafficPolicy: + type: string + ipFamilies: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ipFamilyPolicy: + type: string + loadBalancerClass: + type: string + loadBalancerIP: + type: string + loadBalancerSourceRanges: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ports: + items: + properties: + appProtocol: + type: string + name: + type: string + nodePort: + format: int32 + type: integer + port: + format: int32 + type: integer + protocol: + default: TCP + type: string + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + type: array + x-kubernetes-list-map-keys: + - port + - protocol + x-kubernetes-list-type: map + publishNotReadyAddresses: + type: boolean + selector: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: atomic + sessionAffinity: + type: string + sessionAffinityConfig: + properties: + clientIP: + properties: + timeoutSeconds: + format: int32 + type: integer + type: object + type: object + trafficDistribution: + type: string + type: + type: string + type: object + useAsDefault: + type: boolean + required: + - spec + type: object + startupProbe: + properties: + exec: + properties: + command: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + failureThreshold: + format: int32 + type: integer + grpc: + properties: + port: + format: int32 + type: integer + service: + default: "" + type: string + required: + - port + type: object + httpGet: + properties: + host: + type: string + httpHeaders: + items: + properties: + name: + type: string + value: + type: string + required: + - name + - value + type: object + type: array + x-kubernetes-list-type: atomic + path: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + scheme: + type: string + required: + - port + type: object + initialDelaySeconds: + format: int32 + type: integer + periodSeconds: + format: int32 + type: integer + successThreshold: + format: int32 + type: integer + tcpSocket: + properties: + host: + type: string + port: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + required: + - port + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + timeoutSeconds: + format: int32 + type: integer + type: object + storage: + properties: + disableMountSubPath: + type: boolean + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + volumeClaimTemplate: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + status: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + allocatedResourceStatuses: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: granular + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + capacity: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + conditions: + items: + properties: + lastProbeTime: + format: date-time + type: string + lastTransitionTime: + format: date-time + type: string + message: + type: string + reason: + type: string + status: + type: string + type: + type: string + required: + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + currentVolumeAttributesClassName: + type: string + modifyVolumeStatus: + properties: + status: + type: string + targetVolumeAttributesClassName: + type: string + required: + - status + type: object + phase: + type: string + type: object + type: object + type: object + storageDataPath: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + matchLabelKeys: + items: + type: string + type: array + x-kubernetes-list-type: atomic + maxSkew: + format: int32 + type: integer + minDomains: + format: int32 + type: integer + nodeAffinityPolicy: + type: string + nodeTaintsPolicy: + type: string + topologyKey: + type: string + whenUnsatisfiable: + type: string + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + type: array + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + vmBackup: + properties: + acceptEULA: + type: boolean + concurrency: + format: int32 + type: integer + credentialsSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + customS3Endpoint: + type: string + destination: + type: string + destinationDisableSuffixAdd: + type: boolean + disableDaily: + type: boolean + disableHourly: + type: boolean + disableMonthly: + type: boolean + disableWeekly: + type: boolean + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: + - name + type: object + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + logFormat: + enum: + - default + - json + type: string + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + port: + type: string + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restore: + properties: + onStart: + properties: + enabled: + type: boolean + type: object + type: object + snapshotCreateURL: + type: string + snapshotDeleteURL: + type: string + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + type: object + vmInsertPort: + type: string + vmSelectPort: + type: string + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + properties: + awsElasticBlockStore: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + azureDisk: + properties: + cachingMode: + type: string + diskName: + type: string + diskURI: + type: string + fsType: + default: ext4 + type: string + kind: + type: string + readOnly: + default: false + type: boolean + required: + - diskName + - diskURI + type: object + azureFile: + properties: + readOnly: + type: boolean + secretName: + type: string + shareName: + type: string + required: + - secretName + - shareName + type: object + cephfs: + properties: + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + path: + type: string + readOnly: + type: boolean + secretFile: + type: string + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + type: string + required: + - monitors + type: object + cinder: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeID: + type: string + required: + - volumeID + type: object + configMap: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + csi: + properties: + driver: + type: string + fsType: + type: string + nodePublishSecretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + readOnly: + type: boolean + volumeAttributes: + additionalProperties: + type: string + type: object + required: + - driver + type: object + downwardAPI: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + emptyDir: + properties: + medium: + type: string + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + ephemeral: + properties: + volumeClaimTemplate: + properties: + metadata: + type: object + spec: + properties: + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: + type: string + type: object + required: + - spec + type: object + type: object + fc: + properties: + fsType: + type: string + lun: + format: int32 + type: integer + readOnly: + type: boolean + targetWWNs: + items: + type: string + type: array + x-kubernetes-list-type: atomic + wwids: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + flexVolume: + properties: + driver: + type: string + fsType: + type: string + options: + additionalProperties: + type: string + type: object + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + required: + - driver + type: object + flocker: + properties: + datasetName: + type: string + datasetUUID: + type: string + type: object + gcePersistentDisk: + properties: + fsType: + type: string + partition: + format: int32 + type: integer + pdName: + type: string + readOnly: + type: boolean + required: + - pdName + type: object + gitRepo: + properties: + directory: + type: string + repository: + type: string + revision: + type: string + required: + - repository + type: object + glusterfs: + properties: + endpoints: + type: string + path: + type: string + readOnly: + type: boolean + required: + - endpoints + - path + type: object + hostPath: + properties: + path: + type: string + type: + type: string + required: + - path + type: object + image: + properties: + pullPolicy: + type: string + reference: + type: string + type: object + iscsi: + properties: + chapAuthDiscovery: + type: boolean + chapAuthSession: + type: boolean + fsType: + type: string + initiatorName: + type: string + iqn: + type: string + iscsiInterface: + default: default + type: string + lun: + format: int32 + type: integer + portals: + items: + type: string + type: array + x-kubernetes-list-type: atomic + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + targetPortal: + type: string + required: + - iqn + - lun + - targetPortal + type: object + name: + type: string + nfs: + properties: + path: + type: string + readOnly: + type: boolean + server: + type: string + required: + - path + - server + type: object + persistentVolumeClaim: + properties: + claimName: + type: string + readOnly: + type: boolean + required: + - claimName + type: object + photonPersistentDisk: + properties: + fsType: + type: string + pdID: + type: string + required: + - pdID + type: object + portworxVolume: + properties: + fsType: + type: string + readOnly: + type: boolean + volumeID: + type: string + required: + - volumeID + type: object + projected: + properties: + defaultMode: + format: int32 + type: integer + sources: + items: + properties: + clusterTrustBundle: + properties: + labelSelector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object + type: object + x-kubernetes-map-type: atomic + name: + type: string + optional: + type: boolean + path: + type: string + signerName: + type: string + required: + - path + type: object + configMap: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + downwardAPI: + properties: + items: + items: + properties: + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + mode: + format: int32 + type: integer + path: + type: string + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + required: + - path + type: object + type: array + x-kubernetes-list-type: atomic + type: object + podCertificate: + properties: + certificateChainPath: + type: string + credentialBundlePath: + type: string + keyPath: + type: string + keyType: + type: string + maxExpirationSeconds: + format: int32 + type: integer + signerName: + type: string + required: + - keyType + - signerName + type: object + secret: + properties: + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + serviceAccountToken: + properties: + audience: + type: string + expirationSeconds: + format: int64 + type: integer + path: + type: string + required: + - path + type: object + type: object + type: array + x-kubernetes-list-type: atomic + type: object + quobyte: + properties: + group: + type: string + readOnly: + type: boolean + registry: + type: string + tenant: + type: string + user: + type: string + volume: + type: string + required: + - registry + - volume + type: object + rbd: + properties: + fsType: + type: string + image: + type: string + keyring: + default: /etc/ceph/keyring + type: string + monitors: + items: + type: string + type: array + x-kubernetes-list-type: atomic + pool: + default: rbd + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + user: + default: admin + type: string + required: + - image + - monitors + type: object + scaleIO: + properties: + fsType: + default: xfs + type: string + gateway: + type: string + protectionDomain: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + sslEnabled: + type: boolean + storageMode: + default: ThinProvisioned + type: string + storagePool: + type: string + system: + type: string + volumeName: + type: string + required: + - gateway + - secretRef + - system + type: object + secret: + properties: + defaultMode: + format: int32 + type: integer + items: + items: + properties: + key: + type: string + mode: + format: int32 + type: integer + path: + type: string + required: + - key + - path + type: object + type: array + x-kubernetes-list-type: atomic + optional: + type: boolean + secretName: + type: string + type: object + storageos: + properties: + fsType: + type: string + readOnly: + type: boolean + secretRef: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + volumeName: + type: string + volumeNamespace: + type: string + type: object + vsphereVolume: + properties: + fsType: + type: string + storagePolicyID: + type: string + storagePolicyName: + type: string + volumePath: + type: string + required: + - volumePath + type: object + required: + - name + type: object + type: array + type: object type: object type: object - snapshotCreateURL: - description: SnapshotCreateURL overwrites url for snapshot - create + type: array + type: object + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time type: string - snapshotDeleteURL: - description: SnapShotDeleteURL overwrites url for snapshot - delete + lastUpdateTime: + format: date-time type: string - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment definition. - VolumeMounts specified will be appended to other VolumeMounts in the vmbackupmanager container, - that are generated as a result of StorageSpec objects. - items: - description: VolumeMount describes a mounting of a Volume - within a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type type: object - vmInsertPort: - description: VMInsertPort for VMInsert connections - type: string - vmSelectPort: - description: VMSelectPort for VMSelect connections - type: string - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that - may be accessed by any container in the pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - type: object - type: object - status: - description: VMClusterStatus defines the observed state of VMCluster - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 - type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -30162,3879 +41687,1595 @@ spec: singular: vmnodescrape scope: Namespaced versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.updateStatus - name: Status - type: string - - jsonPath: .status.reason - name: Sync Error - type: string - name: v1beta1 - schema: - openAPIV3Schema: - description: |- - VMNodeScrape defines discovery for targets placed on kubernetes nodes, - usually its node-exporters and other host services. - InternalIP is used as __address__ for scraping. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VMNodeScrapeSpec defines specification for VMNodeScrape. - properties: - authorization: - description: Authorization with http header Authorization - properties: - credentials: - description: Reference to the secret with value for authorization - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization - type: string - type: - description: Type of authorization, default to bearer - type: string - type: object - basicAuth: - description: BasicAuth allow an endpoint to authenticate over basic - authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearerTokenFile: - description: File to read bearer token for scraping targets. - type: string - bearerTokenSecret: - description: |- - Secret to mount to read bearer token for scraping targets. The secret - needs to be in the same namespace as the scrape object and accessible by - the victoria-metrics operator. - nullable: true - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - follow_redirects: - description: FollowRedirects controls redirects for scraping. - type: boolean - honorLabels: - description: HonorLabels chooses the metric's labels on collisions - with target labels. - type: boolean - honorTimestamps: - description: HonorTimestamps controls whether vmagent respects the - timestamps present in scraped data. - type: boolean - interval: - description: Interval at which metrics should be scraped - type: string - jobLabel: - description: The label to use to retrieve the job name from. - type: string - max_scrape_size: - description: MaxScrapeSize defines a maximum size of scraped data - for a job - type: string - metricRelabelConfigs: - description: MetricRelabelConfigs to apply to samples after scrapping. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.updateStatus + name: Status + type: string + - jsonPath: .status.reason + name: Sync Error + type: string + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + authorization: properties: - action: - description: Action to perform based on regex matching. Default - is 'replace' + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + credentialsFile: type: string - if: - description: 'If represents metricsQL match expression (or list - of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for `action: - graphite`' + type: + type: string + type: object + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' + x-kubernetes-map-type: atomic + password_file: type: string - modulus: - description: Modulus to take of the hash of the source label - values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearerTokenFile: + type: string + bearerTokenSecret: + nullable: true + properties: + key: type: string - separator: - description: Separator placed between concatenated source label - values. default is ';'. + name: + default: "" type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: - type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - oauth2: - description: OAuth2 defines auth configuration - properties: - client_id: - description: The secret or configmap containing the OAuth2 client - id + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + follow_redirects: + type: boolean + honorLabels: + type: boolean + honorTimestamps: + type: boolean + interval: + type: string + jobLabel: + type: string + max_scrape_size: + type: string + metricRelabelConfigs: + items: properties: - configMap: - description: ConfigMap containing data to use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string type: object - x-kubernetes-map-type: atomic - type: object - client_secret: - description: The secret containing the OAuth2 client secret - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - client_secret_file: - description: ClientSecretFile defines path for client secret file. - type: string - endpoint_params: - additionalProperties: - type: string - description: Parameters to append to the token URL type: object - proxy_url: - description: |- - The proxy URL for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - type: string - scopes: - description: OAuth2 scopes used for the token request - items: - type: string - type: array - tls_config: - description: |- - TLSConfig for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - x-kubernetes-preserve-unknown-fields: true - token_url: - description: The URL to fetch the token from - minLength: 1 - type: string - required: - - client_id - - token_url - type: object - params: - additionalProperties: - items: - type: string type: array - description: Optional HTTP URL parameters - type: object - path: - description: HTTP path to scrape for metrics. - type: string - port: - description: Name of the port exposed at Node. - type: string - proxyURL: - description: ProxyURL eg http://proxyserver:2195 Directs scrapes to - proxy through this endpoint. - type: string - relabelConfigs: - description: RelabelConfigs to apply to samples during service discovery. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling + oauth2: properties: - action: - description: Action to perform based on regex matching. Default - is 'replace' + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + client_secret_file: type: string - if: - description: 'If represents metricsQL match expression (or list - of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: + endpoint_params: additionalProperties: type: string - description: 'Labels is used together with Match for `action: - graphite`' type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source label - values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source label - values. default is ';'. + proxy_url: type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. + scopes: items: type: string type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - sampleLimit: - description: SampleLimit defines per-scrape limit on number of scraped - samples that will be accepted. - type: integer - scheme: - description: HTTP scheme to use for scraping. - enum: - - http - - https - - HTTPS - - HTTP - type: string - scrape_interval: - description: |- - ScrapeInterval is the same as Interval and has priority over it. - one of scrape_interval or interval can be used - type: string - scrapeClass: - description: ScrapeClass defined scrape class to apply - type: string - scrapeTimeout: - description: Timeout after which the scrape is ended - type: string - selector: - description: Selector to select kubernetes Nodes. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url + type: object + params: + additionalProperties: items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object + type: string type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - seriesLimit: - description: |- - SeriesLimit defines per-scrape limit on number of unique time series - a single target can expose during all the scrapes on the time window of 24h. - type: integer - targetLabels: - description: TargetLabels transfers labels on the Kubernetes Node - onto the target. - items: + type: object + path: type: string - type: array - tlsConfig: - description: TLSConfig configuration to use when scraping the endpoint - properties: - ca: - description: Struct containing the CA cert to use for the targets. - properties: - configMap: - description: ConfigMap containing data to use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container to use for the - targets. - type: string - cert: - description: Struct containing the client cert file for the targets. + port: + type: string + proxyURL: + type: string + relabelConfigs: + items: properties: - configMap: - description: ConfigMap containing data to use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the container for - the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container for - the targets. - type: string - keySecret: - description: Secret containing the client key file for the targets. - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string - type: object - vm_scrape_params: - description: VMScrapeParams defines VictoriaMetrics specific scrape - parameters - properties: - disable_compression: - description: DisableCompression - type: boolean - disable_keep_alive: - description: |- - disable_keepalive allows disabling HTTP keep-alive when scraping targets. - By default, HTTP keep-alive is enabled, so TCP connections to scrape targets - could be reused. - See https://docs.victoriametrics.com/victoriametrics/vmagent/#scrape_config-enhancements - type: boolean - headers: - description: |- - Headers allows sending custom headers to scrape targets - must be in of semicolon separated header with it's value - eg: - headerName: headerValue - vmagent supports since 1.79.0 version - items: - type: string - type: array - no_stale_markers: - type: boolean - proxy_client_config: - description: |- - ProxyClientConfig configures proxy auth settings for scraping - See feature description https://docs.victoriametrics.com/victoriametrics/vmagent/#scraping-targets-via-a-proxy - properties: - basic_auth: - description: BasicAuth allow an endpoint to authenticate over - basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearer_token: - description: SecretKeySelector selects a key of a Secret. + type: array + sampleLimit: + type: integer + scheme: + enum: + - http + - https + - HTTPS + - HTTP + type: string + scrape_interval: + type: string + scrapeClass: + type: string + scrapeTimeout: + type: string + selector: + properties: + matchExpressions: + items: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + operator: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic required: - - key + - key + - operator type: object - x-kubernetes-map-type: atomic - bearer_token_file: + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: type: string - tls_config: - x-kubernetes-preserve-unknown-fields: true - type: object - scrape_align_interval: - type: string - scrape_offset: + type: object + type: object + x-kubernetes-map-type: atomic + seriesLimit: + type: integer + targetLabels: + items: type: string - stream_parse: - type: boolean - type: object - type: object - status: - description: ScrapeObjectStatus defines the observed state of ScrapeObjects - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 - type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.18.0 - name: vmpodscrapes.operator.victoriametrics.com -spec: - group: operator.victoriametrics.com - names: - kind: VMPodScrape - listKind: VMPodScrapeList - plural: vmpodscrapes - singular: vmpodscrape - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.updateStatus - name: Status - type: string - - jsonPath: .status.reason - name: Sync Error - type: string - name: v1beta1 - schema: - openAPIV3Schema: - description: |- - VMPodScrape is scrape configuration for pods, - it generates vmagent's config for scraping pod targets - based on selectors. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VMPodScrapeSpec defines the desired state of VMPodScrape - properties: - attach_metadata: - description: AttachMetadata configures metadata attaching from service - discovery - properties: - namespace: - description: |- - Namespace instructs vmagent to add namespace specific metadata from service discovery - Valid for roles: pod, service, endpoints, endpointslice, ingress. - type: boolean - node: - description: |- - Node instructs vmagent to add node specific metadata from service discovery - Valid for roles: pod, endpoints, endpointslice. - type: boolean - type: object - jobLabel: - description: The label to use to retrieve the job name from. - type: string - namespaceSelector: - description: Selector to select which namespaces the Endpoints objects - are discovered from. - properties: - any: - description: |- - Boolean describing whether all namespaces are selected in contrast to a - list restricting them. - type: boolean - matchNames: - description: List of namespace names. - items: - type: string - type: array - type: object - podMetricsEndpoints: - description: A list of endpoints allowed as part of this PodMonitor. - items: - description: PodMetricsEndpoint defines a scrapeable endpoint of - a Kubernetes Pod serving metrics. + type: array + tlsConfig: properties: - attach_metadata: - description: AttachMetadata configures metadata attaching from - service discovery - properties: - namespace: - description: |- - Namespace instructs vmagent to add namespace specific metadata from service discovery - Valid for roles: pod, service, endpoints, endpointslice, ingress. - type: boolean - node: - description: |- - Node instructs vmagent to add node specific metadata from service discovery - Valid for roles: pod, endpoints, endpointslice. - type: boolean - type: object - authorization: - description: Authorization with http header Authorization + ca: properties: - credentials: - description: Reference to the secret with value for authorization + configMap: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key type: object x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization - type: string - type: - description: Type of authorization, default to bearer - type: string type: object - basicAuth: - description: BasicAuth allow an endpoint to authenticate over - basic authentication + caFile: + type: string + cert: properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object + configMap: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object + secret: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic type: object - bearerTokenFile: - description: File to read bearer token for scraping targets. + certFile: type: string - bearerTokenSecret: - description: |- - Secret to mount to read bearer token for scraping targets. The secret - needs to be in the same namespace as the scrape object and accessible by - the victoria-metrics operator. - nullable: true + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - filterRunning: - description: |- - FilterRunning applies filter with pod status == running - it prevents from scrapping metrics at failed or succeed state pods. - enabled by default - type: boolean - follow_redirects: - description: FollowRedirects controls redirects for scraping. - type: boolean - honorLabels: - description: HonorLabels chooses the metric's labels on collisions - with target labels. + serverName: + type: string + type: object + vm_scrape_params: + properties: + disable_compression: type: boolean - honorTimestamps: - description: HonorTimestamps controls whether vmagent respects - the timestamps present in scraped data. + disable_keep_alive: type: boolean - interval: - description: Interval at which metrics should be scraped - type: string - max_scrape_size: - description: MaxScrapeSize defines a maximum size of scraped - data for a job - type: string - metricRelabelConfigs: - description: MetricRelabelConfigs to apply to samples after - scrapping. + headers: items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling - properties: - action: - description: Action to perform based on regex matching. - Default is 'replace' - type: string - if: - description: 'If represents metricsQL match expression - (or list of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for `action: - graphite`' - type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source - label values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source - label values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: - type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object + type: string type: array - oauth2: - description: OAuth2 defines auth configuration + no_stale_markers: + type: boolean + proxy_client_config: properties: - client_id: - description: The secret or configmap containing the OAuth2 - client id + basic_auth: properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. + password: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key - must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - type: object - client_secret: - description: The secret containing the OAuth2 client secret - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - client_secret_file: - description: ClientSecretFile defines path for client secret - file. - type: string - endpoint_params: - additionalProperties: - type: string - description: Parameters to append to the token URL - type: object - proxy_url: - description: |- - The proxy URL for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - type: string - scopes: - description: OAuth2 scopes used for the token request - items: - type: string - type: array - tls_config: - description: |- - TLSConfig for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - x-kubernetes-preserve-unknown-fields: true - token_url: - description: The URL to fetch the token from - minLength: 1 - type: string - required: - - client_id - - token_url - type: object - params: - additionalProperties: - items: - type: string - type: array - description: Optional HTTP URL parameters - type: object - path: - description: HTTP path to scrape for metrics. - type: string - port: - description: Name of the port exposed at Pod. - type: string - portNumber: - description: PortNumber defines the `Pod` port number which - exposes the endpoint. - format: int32 - maximum: 65535 - minimum: 1 - type: integer - proxyURL: - description: ProxyURL eg http://proxyserver:2195 Directs scrapes - to proxy through this endpoint. - type: string - relabelConfigs: - description: RelabelConfigs to apply to samples during service - discovery. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling - properties: - action: - description: Action to perform based on regex matching. - Default is 'replace' - type: string - if: - description: 'If represents metricsQL match expression - (or list of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for `action: - graphite`' - type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source - label values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source - label values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: + password_file: type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - sampleLimit: - description: SampleLimit defines per-scrape limit on number - of scraped samples that will be accepted. - type: integer - scheme: - description: HTTP scheme to use for scraping. - enum: - - http - - https - - HTTPS - - HTTP - type: string - scrape_interval: - description: |- - ScrapeInterval is the same as Interval and has priority over it. - one of scrape_interval or interval can be used - type: string - scrapeTimeout: - description: Timeout after which the scrape is ended - type: string - seriesLimit: - description: |- - SeriesLimit defines per-scrape limit on number of unique time series - a single target can expose during all the scrapes on the time window of 24h. - type: integer - targetPort: - anyOf: - - type: integer - - type: string - description: |- - TargetPort defines name or number of the pod port this endpoint refers to. - Mutually exclusive with Port and PortNumber. - x-kubernetes-int-or-string: true - tlsConfig: - description: TLSConfig configuration to use when scraping the - endpoint - properties: - ca: - description: Struct containing the CA cert to use for the - targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container to use - for the targets. - type: string - cert: - description: Struct containing the client cert file for - the targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. + username: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key - must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic type: object - certFile: - description: Path to the client cert file in the container - for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container - for the targets. - type: string - keySecret: - description: Secret containing the client key file for the - targets. + bearer_token: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string - type: object - vm_scrape_params: - description: VMScrapeParams defines VictoriaMetrics specific - scrape parameters - properties: - disable_compression: - description: DisableCompression - type: boolean - disable_keep_alive: - description: |- - disable_keepalive allows disabling HTTP keep-alive when scraping targets. - By default, HTTP keep-alive is enabled, so TCP connections to scrape targets - could be reused. - See https://docs.victoriametrics.com/victoriametrics/vmagent/#scrape_config-enhancements - type: boolean - headers: - description: |- - Headers allows sending custom headers to scrape targets - must be in of semicolon separated header with it's value - eg: - headerName: headerValue - vmagent supports since 1.79.0 version - items: - type: string - type: array - no_stale_markers: - type: boolean - proxy_client_config: - description: |- - ProxyClientConfig configures proxy auth settings for scraping - See feature description https://docs.victoriametrics.com/victoriametrics/vmagent/#scraping-targets-via-a-proxy - properties: - basic_auth: - description: BasicAuth allow an endpoint to authenticate - over basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearer_token: - description: SecretKeySelector selects a key of a Secret. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - bearer_token_file: type: string - tls_config: - x-kubernetes-preserve-unknown-fields: true + optional: + type: boolean + required: + - key type: object - scrape_align_interval: - type: string - scrape_offset: + x-kubernetes-map-type: atomic + bearer_token_file: type: string - stream_parse: - type: boolean - type: object - type: object - type: array - podTargetLabels: - description: PodTargetLabels transfers labels on the Kubernetes Pod - onto the target. - items: - type: string - type: array - sampleLimit: - description: SampleLimit defines per-scrape limit on number of scraped - samples that will be accepted. - type: integer - scrapeClass: - description: ScrapeClass defined scrape class to apply - type: string - selector: - description: Selector to select Pod objects. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator + tls_config: + x-kubernetes-preserve-unknown-fields: true type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - seriesLimit: - description: |- - SeriesLimit defines per-scrape limit on number of unique time series - a single target can expose during all the scrapes on the time window of 24h. - type: integer - required: - - podMetricsEndpoints - type: object - status: - description: ScrapeObjectStatus defines the observed state of ScrapeObjects - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 + scrape_align_interval: type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 + scrape_offset: type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} + stream_parse: + type: boolean + type: object + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.18.0 - name: vmprobes.operator.victoriametrics.com + name: vmpodscrapes.operator.victoriametrics.com spec: group: operator.victoriametrics.com names: - kind: VMProbe - listKind: VMProbeList - plural: vmprobes - singular: vmprobe + kind: VMPodScrape + listKind: VMPodScrapeList + plural: vmpodscrapes + singular: vmpodscrape scope: Namespaced versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.updateStatus - name: Status - type: string - - jsonPath: .status.reason - name: Sync Error - type: string - name: v1beta1 - schema: - openAPIV3Schema: - description: |- - VMProbe defines a probe for targets, that will be executed with prober, - like blackbox exporter. - It helps to monitor reachability of target with various checks. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VMProbeSpec contains specification parameters for a Probe. - properties: - authorization: - description: Authorization with http header Authorization - properties: - credentials: - description: Reference to the secret with value for authorization - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization - type: string - type: - description: Type of authorization, default to bearer - type: string - type: object - basicAuth: - description: BasicAuth allow an endpoint to authenticate over basic - authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearerTokenFile: - description: File to read bearer token for scraping targets. - type: string - bearerTokenSecret: - description: |- - Secret to mount to read bearer token for scraping targets. The secret - needs to be in the same namespace as the scrape object and accessible by - the victoria-metrics operator. - nullable: true - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - follow_redirects: - description: FollowRedirects controls redirects for scraping. - type: boolean - honorLabels: - description: HonorLabels chooses the metric's labels on collisions - with target labels. - type: boolean - honorTimestamps: - description: HonorTimestamps controls whether vmagent respects the - timestamps present in scraped data. - type: boolean - interval: - description: Interval at which metrics should be scraped - type: string - jobName: - description: The job name assigned to scraped metrics by default. - type: string - max_scrape_size: - description: MaxScrapeSize defines a maximum size of scraped data - for a job - type: string - metricRelabelConfigs: - description: MetricRelabelConfigs to apply to samples after scrapping. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.updateStatus + name: Status + type: string + - jsonPath: .status.reason + name: Sync Error + type: string + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + attach_metadata: properties: - action: - description: Action to perform based on regex matching. Default - is 'replace' - type: string - if: - description: 'If represents metricsQL match expression (or list - of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for `action: - graphite`' - type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source label - values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source label - values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. + namespace: + type: boolean + node: + type: boolean + type: object + jobLabel: + type: string + namespaceSelector: + properties: + any: + type: boolean + matchNames: items: type: string type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - module: - description: |- - The module to use for probing specifying how to probe the target. - Example module configuring in the blackbox exporter: - https://github.com/prometheus/blackbox_exporter/blob/master/example.yml - type: string - oauth2: - description: OAuth2 defines auth configuration - properties: - client_id: - description: The secret or configmap containing the OAuth2 client - id + type: object + podMetricsEndpoints: + items: properties: - configMap: - description: ConfigMap containing data to use for the targets. + attach_metadata: properties: - key: - description: The key to select. + namespace: + type: boolean + node: + type: boolean + type: object + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + credentialsFile: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearerTokenFile: + type: string + bearerTokenSecret: + nullable: true properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - type: object - client_secret: - description: The secret containing the OAuth2 client secret - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined + filterRunning: type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - client_secret_file: - description: ClientSecretFile defines path for client secret file. - type: string - endpoint_params: - additionalProperties: - type: string - description: Parameters to append to the token URL - type: object - proxy_url: - description: |- - The proxy URL for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - type: string - scopes: - description: OAuth2 scopes used for the token request - items: - type: string - type: array - tls_config: - description: |- - TLSConfig for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - x-kubernetes-preserve-unknown-fields: true - token_url: - description: The URL to fetch the token from - minLength: 1 - type: string - required: - - client_id - - token_url - type: object - params: - additionalProperties: - items: - type: string - type: array - description: Optional HTTP URL parameters - type: object - path: - description: HTTP path to scrape for metrics. - type: string - proxyURL: - description: ProxyURL eg http://proxyserver:2195 Directs scrapes to - proxy through this endpoint. - type: string - sampleLimit: - description: SampleLimit defines per-scrape limit on number of scraped - samples that will be accepted. - type: integer - scheme: - description: HTTP scheme to use for scraping. - enum: - - http - - https - - HTTPS - - HTTP - type: string - scrape_interval: - description: |- - ScrapeInterval is the same as Interval and has priority over it. - one of scrape_interval or interval can be used - type: string - scrapeClass: - description: ScrapeClass defined scrape class to apply - type: string - scrapeTimeout: - description: Timeout after which the scrape is ended - type: string - seriesLimit: - description: |- - SeriesLimit defines per-scrape limit on number of unique time series - a single target can expose during all the scrapes on the time window of 24h. - type: integer - targets: - description: Targets defines a set of static and/or dynamically discovered - targets to be probed using the prober. - properties: - ingress: - description: Ingress defines the set of dynamically discovered - ingress objects which hosts are considered for probing. - properties: - namespaceSelector: - description: Select Ingress objects by namespace. - properties: - any: - description: |- - Boolean describing whether all namespaces are selected in contrast to a - list restricting them. - type: boolean - matchNames: - description: List of namespace names. - items: - type: string - type: array - type: object - relabelingConfigs: - description: RelabelConfigs to apply to samples during service - discovery. + follow_redirects: + type: boolean + honorLabels: + type: boolean + honorTimestamps: + type: boolean + interval: + type: string + max_scrape_size: + type: string + metricRelabelConfigs: items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling properties: action: - description: Action to perform based on regex matching. - Default is 'replace' type: string if: - description: 'If represents metricsQL match expression - (or list of expressions): ''{__name__=~"foo_.*"}''' x-kubernetes-preserve-unknown-fields: true labels: additionalProperties: type: string - description: 'Labels is used together with Match for - `action: graphite`' type: object match: - description: 'Match is used together with Labels for - `action: graphite`' type: string modulus: - description: Modulus to take of the hash of the source - label values. format: int64 type: integer regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements x-kubernetes-preserve-unknown-fields: true replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' type: string separator: - description: Separator placed between concatenated source - label values. default is ';'. type: string source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 items: type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - selector: - description: Select Ingress objects by labels. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: + optional: + type: boolean + required: - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: + type: object + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: additionalProperties: type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. type: object + proxy_url: + type: string + scopes: + items: + type: string + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url type: object - x-kubernetes-map-type: atomic - type: object - staticConfig: - description: StaticConfig defines static targets which are considers - for probing. - properties: - labels: + params: additionalProperties: - type: string - description: Labels assigned to all metrics scraped from the - targets. + items: + type: string + type: array type: object - relabelingConfigs: - description: RelabelConfigs to apply to samples during service - discovery. + path: + type: string + port: + type: string + portNumber: + format: int32 + maximum: 65535 + minimum: 1 + type: integer + proxyURL: + type: string + relabelConfigs: items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling properties: action: - description: Action to perform based on regex matching. - Default is 'replace' type: string if: - description: 'If represents metricsQL match expression - (or list of expressions): ''{__name__=~"foo_.*"}''' x-kubernetes-preserve-unknown-fields: true labels: additionalProperties: type: string - description: 'Labels is used together with Match for - `action: graphite`' type: object match: - description: 'Match is used together with Labels for - `action: graphite`' type: string modulus: - description: Modulus to take of the hash of the source - label values. format: int64 type: integer regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements x-kubernetes-preserve-unknown-fields: true replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' type: string separator: - description: Separator placed between concatenated source - label values. default is ';'. type: string source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 items: type: string type: array sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. items: type: string type: array target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 type: string targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. type: string type: object type: array - targets: - description: Targets is a list of URLs to probe using the - configured prober. - items: - type: string - type: array - required: - - targets - type: object - type: object - tlsConfig: - description: TLSConfig configuration to use when scraping the endpoint - properties: - ca: - description: Struct containing the CA cert to use for the targets. - properties: - configMap: - description: ConfigMap containing data to use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container to use for the - targets. - type: string - cert: - description: Struct containing the client cert file for the targets. - properties: - configMap: - description: ConfigMap containing data to use for the targets. + sampleLimit: + type: integer + scheme: + enum: + - http + - https + - HTTPS + - HTTP + type: string + scrape_interval: + type: string + scrapeTimeout: + type: string + seriesLimit: + type: integer + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + tlsConfig: properties: - key: - description: The key to select. + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined + insecureSkipVerify: type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + keyFile: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the container for - the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container for - the targets. - type: string - keySecret: - description: Secret containing the client key file for the targets. - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string - type: object - vm_scrape_params: - description: VMScrapeParams defines VictoriaMetrics specific scrape - parameters - properties: - disable_compression: - description: DisableCompression - type: boolean - disable_keep_alive: - description: |- - disable_keepalive allows disabling HTTP keep-alive when scraping targets. - By default, HTTP keep-alive is enabled, so TCP connections to scrape targets - could be reused. - See https://docs.victoriametrics.com/victoriametrics/vmagent/#scrape_config-enhancements - type: boolean - headers: - description: |- - Headers allows sending custom headers to scrape targets - must be in of semicolon separated header with it's value - eg: - headerName: headerValue - vmagent supports since 1.79.0 version - items: - type: string - type: array - no_stale_markers: - type: boolean - proxy_client_config: - description: |- - ProxyClientConfig configures proxy auth settings for scraping - See feature description https://docs.victoriametrics.com/victoriametrics/vmagent/#scraping-targets-via-a-proxy - properties: - basic_auth: - description: BasicAuth allow an endpoint to authenticate over - basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object + keySecret: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key - must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted + serverName: type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object + type: object + vm_scrape_params: + properties: + disable_compression: + type: boolean + disable_keep_alive: + type: boolean + headers: + items: + type: string + type: array + no_stale_markers: + type: boolean + proxy_client_config: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + bearer_token_file: type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key + tls_config: + x-kubernetes-preserve-unknown-fields: true type: object - x-kubernetes-map-type: atomic + scrape_align_interval: + type: string + scrape_offset: + type: string + stream_parse: + type: boolean type: object - bearer_token: - description: SecretKeySelector selects a key of a Secret. + type: object + type: array + podTargetLabels: + items: + type: string + type: array + sampleLimit: + type: integer + scrapeClass: + type: string + selector: + properties: + matchExpressions: + items: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + operator: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic required: - - key + - key + - operator type: object - x-kubernetes-map-type: atomic - bearer_token_file: + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: type: string - tls_config: - x-kubernetes-preserve-unknown-fields: true + type: object + type: object + x-kubernetes-map-type: atomic + seriesLimit: + type: integer + required: + - podMetricsEndpoints + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type type: object - scrape_align_interval: - type: string - scrape_offset: - type: string - stream_parse: - type: boolean - type: object - vmProberSpec: - description: |- - Specification for the prober to use for probing targets. - The prober.URL parameter is required. Targets cannot be probed if left empty. - properties: - path: - description: |- - Path to collect metrics from. - Defaults to `/probe`. - type: string - scheme: - description: |- - HTTP scheme to use for scraping. - Defaults to `http`. - enum: - - http - - https - type: string - url: - description: Mandatory URL of the prober. - type: string - required: - - url - type: object - required: - - vmProberSpec - type: object - status: - description: ScrapeObjectStatus defines the observed state of ScrapeObjects - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 - type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.18.0 - name: vmrules.operator.victoriametrics.com + name: vmprobes.operator.victoriametrics.com spec: group: operator.victoriametrics.com names: - kind: VMRule - listKind: VMRuleList - plural: vmrules - singular: vmrule + kind: VMProbe + listKind: VMProbeList + plural: vmprobes + singular: vmprobe scope: Namespaced versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.updateStatus - name: Status - type: string - - jsonPath: .status.reason - name: Sync Error - type: string - name: v1beta1 - schema: - openAPIV3Schema: - description: VMRule defines rule records for vmalert application - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VMRuleSpec defines the desired state of VMRule - properties: - groups: - description: Groups list of group rules - items: - description: RuleGroup is a list of sequentially evaluated recording - and alerting rules. + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.updateStatus + name: Status + type: string + - jsonPath: .status.reason + name: Sync Error + type: string + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + authorization: properties: - concurrency: - description: Concurrency defines how many rules execute at once. - type: integer - eval_alignment: - description: |- - Optional - The evaluation timestamp will be aligned with group's interval, - instead of using the actual timestamp that evaluation happens at. - It is enabled by default to get more predictable results - and to visually align with graphs plotted via Grafana or vmui. - type: boolean - eval_delay: - description: |- - Optional - Adjust the `time` parameter of group evaluation requests to compensate intentional query delay from the datasource. - type: string - eval_offset: - description: |- - Optional - Group will be evaluated at the exact offset in the range of [0...interval]. - type: string - extra_filter_labels: - additionalProperties: - type: string - description: |- - ExtraFilterLabels optional list of label filters applied to every rule's - request within a group. Is compatible only with VM datasource. - See more details [here](https://docs.victoriametrics.com/victoriametrics/#prometheus-querying-api-enhancements) - Deprecated: use params instead - type: object - headers: - description: |- - Headers contains optional HTTP headers added to each rule request - Must be in form `header-name: value` - For example: - headers: - - "CustomHeader: foo" - - "CustomHeader2: bar" - items: - type: string - type: array - interval: - description: evaluation interval for group - type: string - labels: - additionalProperties: - type: string - description: |- - Labels optional list of labels added to every rule within a group. - It has priority over the external labels. - Labels are commonly used for adding environment - or tenant-specific tag. - type: object - limit: - description: |- - Limit the number of alerts an alerting rule and series a recording - rule can produce - type: integer - name: - description: Name of group - type: string - notifier_headers: - description: |- - NotifierHeaders contains optional HTTP headers added to each alert request which will send to notifier - Must be in form `header-name: value` - For example: - headers: - - "CustomHeader: foo" - - "CustomHeader2: bar" - items: - type: string - type: array - params: - additionalProperties: - items: + credentials: + properties: + key: type: string - type: array - description: Params optional HTTP URL parameters added to each - rule request + name: + default: "" + type: string + optional: + type: boolean + required: + - key type: object - rules: - description: Rules list of alert rules - items: - description: Rule describes an alerting or recording rule. - properties: - alert: - description: Alert is a name for alert - type: string - annotations: - additionalProperties: - type: string - description: Annotations will be added to rule configuration - type: object - debug: - description: |- - Debug enables logging for rule - it useful for tracking - type: boolean - expr: - description: Expr is query, that will be evaluated at - dataSource - type: string - for: - description: |- - For evaluation interval in time.Duration format - 30s, 1m, 1h or nanoseconds - type: string - keep_firing_for: - description: |- - KeepFiringFor will make alert continue firing for this long - even when the alerting expression no longer has results. - Use time.Duration format, 30s, 1m, 1h or nanoseconds - type: string - labels: - additionalProperties: - type: string - description: Labels will be added to rule configuration - type: object - record: - description: Record represents a query, that will be recorded - to dataSource - type: string - update_entries_limit: - description: |- - UpdateEntriesLimit defines max number of rule's state updates stored in memory. - Overrides `-rule.updateEntriesLimit` in vmalert. - type: integer - type: object - type: array - tenant: - description: |- - Tenant id for group, can be used only with enterprise version of vmalert. - See more details [here](https://docs.victoriametrics.com/victoriametrics/vmalert/#multitenancy). + x-kubernetes-map-type: atomic + credentialsFile: type: string type: - description: |- - Type defines datasource type for enterprise version of vmalert - possible values - prometheus,graphite,vlogs type: string - required: - - name - - rules - type: object - type: array - required: - - groups - type: object - status: - description: VMRuleStatus defines the observed state of VMRule - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource + type: object + basicAuth: properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearerTokenFile: + type: string + bearerTokenSecret: + nullable: true + properties: + key: type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 + name: + default: "" type: string + optional: + type: boolean required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.18.0 - name: vmscrapeconfigs.operator.victoriametrics.com -spec: - group: operator.victoriametrics.com - names: - kind: VMScrapeConfig - listKind: VMScrapeConfigList - plural: vmscrapeconfigs - singular: vmscrapeconfig - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.updateStatus - name: Status - type: string - - jsonPath: .status.reason - name: Sync Error - type: string - name: v1beta1 - schema: - openAPIV3Schema: - description: VMScrapeConfig specifies a set of targets and parameters describing - how to scrape them. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VMScrapeConfigSpec defines the desired state of VMScrapeConfig - properties: - authorization: - description: Authorization with http header Authorization - properties: - credentials: - description: Reference to the secret with value for authorization + - key + type: object + x-kubernetes-map-type: atomic + follow_redirects: + type: boolean + honorLabels: + type: boolean + honorTimestamps: + type: boolean + interval: + type: string + jobName: + type: string + max_scrape_size: + type: string + metricRelabelConfigs: + items: properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key type: object - x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization - type: string - type: - description: Type of authorization, default to bearer - type: string - type: object - azureSDConfigs: - description: AzureSDConfigs defines a list of Azure service discovery - configurations. - items: - description: |- - AzureSDConfig allow retrieving scrape targets from Azure VMs. - See [here](https://docs.victoriametrics.com/victoriametrics/sd_configs/#azure_sd_configs) + type: array + module: + type: string + oauth2: properties: - authenticationMethod: - description: |- - # The authentication method, either OAuth or ManagedIdentity. - See https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview - enum: - - OAuth - - ManagedIdentity - type: string - clientID: - description: Optional client ID. Only required with the OAuth - authentication method. - type: string - clientSecret: - description: Optional client secret. Only required with the - OAuth authentication method. + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - environment: - description: The Azure environment. + client_secret_file: type: string - port: - description: |- - The port to scrape metrics from. If using the public IP address, this must - instead be specified in the relabeling rule. - type: integer - resourceGroup: - description: Optional resource group name. Limits discovery - to this resource group. + endpoint_params: + additionalProperties: + type: string + type: object + proxy_url: type: string - subscriptionID: - description: The subscription ID. Always required. + scopes: + items: + type: string + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: minLength: 1 type: string - tenantID: - description: Optional tenant ID. Only required with the OAuth - authentication method. - type: string required: - - subscriptionID - type: object - type: array - basicAuth: - description: BasicAuth allow an endpoint to authenticate over basic - authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearerTokenFile: - description: File to read bearer token for scraping targets. - type: string - bearerTokenSecret: - description: |- - Secret to mount to read bearer token for scraping targets. The secret - needs to be in the same namespace as the scrape object and accessible by - the victoria-metrics operator. - nullable: true - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - consulSDConfigs: - description: ConsulSDConfigs defines a list of Consul service discovery - configurations. - items: - description: |- - ConsulSDConfig defines a Consul service discovery configuration. - See [here](https://docs.victoriametrics.com/victoriametrics/sd_configs/#consul_sd_configs) + - client_id + - token_url + type: object + params: + additionalProperties: + items: + type: string + type: array + type: object + path: + type: string + proxyURL: + type: string + sampleLimit: + type: integer + scheme: + enum: + - http + - https + - HTTPS + - HTTP + type: string + scrape_interval: + type: string + scrapeClass: + type: string + scrapeTimeout: + type: string + seriesLimit: + type: integer + targets: properties: - allowStale: - description: |- - Allow stale Consul results (see https://developer.hashicorp.com/consul/api-docs/features/consistency ). Will reduce load on Consul. - If unset, use its default value. - type: boolean - authorization: - description: Authorization header to use on every scrape request. + ingress: properties: - credentials: - description: Reference to the secret with value for authorization + namespaceSelector: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined + any: type: boolean - required: - - key + matchNames: + items: + type: string + type: array + type: object + relabelingConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object type: object x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization - type: string - type: - description: Type of authorization, default to bearer - type: string type: object - basicAuth: - description: BasicAuth information to use on every scrape request. + staticConfig: properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object + labels: + additionalProperties: + type: string + type: object + relabelingConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + targets: + items: + type: string + type: array + required: + - targets + type: object + type: object + tlsConfig: + properties: + ca: + properties: + configMap: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object + secret: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic type: object - datacenter: - description: Consul Datacenter name, if not provided it will - use the local Consul Agent Datacenter. - type: string - filter: - description: |- - Filter defines filter for /v1/catalog/services requests - See https://developer.hashicorp.com/consul/api-docs/features/filtering + caFile: type: string - followRedirects: - description: |- - Configure whether HTTP requests follow HTTP 3xx redirects. - If unset, use its default value. - type: boolean - namespace: - description: Namespaces are only supported in Consul Enterprise. - type: string - nodeMeta: - additionalProperties: - type: string - description: Node metadata key/value pairs to filter nodes for - a given service. - type: object - x-kubernetes-map-type: atomic - oauth2: - description: OAuth2 defines auth configuration + cert: properties: - client_id: - description: The secret or configmap containing the OAuth2 - client id + configMap: properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key type: object - client_secret: - description: The secret containing the OAuth2 client secret + x-kubernetes-map-type: atomic + secret: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - client_secret_file: - description: ClientSecretFile defines path for client secret - file. - type: string - endpoint_params: - additionalProperties: - type: string - description: Parameters to append to the token URL - type: object - proxy_url: - description: |- - The proxy URL for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: type: string - scopes: - description: OAuth2 scopes used for the token request - items: - type: string - type: array - tls_config: - description: |- - TLSConfig for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - x-kubernetes-preserve-unknown-fields: true - token_url: - description: The URL to fetch the token from - minLength: 1 + name: + default: "" type: string + optional: + type: boolean required: - - client_id - - token_url + - key type: object - partition: - description: Admin Partitions are only supported in Consul Enterprise. + x-kubernetes-map-type: atomic + serverName: type: string + type: object + vm_scrape_params: + properties: + disable_compression: + type: boolean + disable_keep_alive: + type: boolean + headers: + items: + type: string + type: array + no_stale_markers: + type: boolean proxy_client_config: - description: |- - ProxyClientConfig configures proxy auth settings for scraping - See [feature description](https://docs.victoriametrics.com/victoriametrics/vmagent/#scraping-targets-via-a-proxy) properties: basic_auth: - description: BasicAuth allow an endpoint to authenticate - over basic authentication properties: password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key - must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted type: string username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key - must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic type: object bearer_token: - description: SecretKeySelector selects a key of a Secret. properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic bearer_token_file: @@ -34042,3757 +43283,2675 @@ spec: tls_config: x-kubernetes-preserve-unknown-fields: true type: object - proxyURL: - description: ProxyURL eg http://proxyserver:2195 Directs scrapes - to proxy through this endpoint. + scrape_align_interval: + type: string + scrape_offset: + type: string + stream_parse: + type: boolean + type: object + vmProberSpec: + properties: + path: type: string scheme: - description: HTTP Scheme default "http" enum: - - HTTP - - HTTPS + - http + - https type: string - server: - description: A valid string consisting of a hostname or IP followed - by an optional port number. - minLength: 1 + url: type: string - services: - description: A list of services for which targets are retrieved. - If omitted, all services are scraped. - items: + required: + - url + type: object + required: + - vmProberSpec + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time type: string - type: array - x-kubernetes-list-type: atomic - tagSeparator: - description: |- - The string by which Consul tags are joined into the tag label. - If unset, use its default value. - type: string - tags: - description: An optional list of tags used to filter nodes for - a given service. Services must contain all tags in the list. - items: + lastUpdateTime: + format: date-time type: string - type: array - x-kubernetes-list-type: atomic - tlsConfig: - description: TLS configuration to use on every scrape request - properties: - ca: - description: Struct containing the CA cert to use for the - targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container to use - for the targets. + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.18.0 + name: vmrules.operator.victoriametrics.com +spec: + group: operator.victoriametrics.com + names: + kind: VMRule + listKind: VMRuleList + plural: vmrules + singular: vmrule + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.updateStatus + name: Status + type: string + - jsonPath: .status.reason + name: Sync Error + type: string + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + groups: + items: + properties: + concurrency: + type: integer + eval_alignment: + type: boolean + eval_delay: + type: string + eval_offset: + type: string + extra_filter_labels: + additionalProperties: type: string - cert: - description: Struct containing the client cert file for - the targets. + type: object + headers: + items: + type: string + type: array + interval: + type: string + labels: + additionalProperties: + type: string + type: object + limit: + type: integer + name: + type: string + notifier_headers: + items: + type: string + type: array + params: + additionalProperties: + items: + type: string + type: array + type: object + rules: + items: properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key + alert: + type: string + annotations: + additionalProperties: + type: string type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key + debug: + type: boolean + expr: + type: string + for: + type: string + keep_firing_for: + type: string + labels: + additionalProperties: + type: string type: object - x-kubernetes-map-type: atomic + record: + type: string + update_entries_limit: + type: integer type: object - certFile: - description: Path to the client cert file in the container - for the targets. + type: array + tenant: + type: string + type: + type: string + required: + - name + - rules + type: object + type: array + required: + - groups + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.18.0 + name: vmscrapeconfigs.operator.victoriametrics.com +spec: + group: operator.victoriametrics.com + names: + kind: VMScrapeConfig + listKind: VMScrapeConfigList + plural: vmscrapeconfigs + singular: vmscrapeconfig + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.updateStatus + name: Status + type: string + - jsonPath: .status.reason + name: Sync Error + type: string + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + authorization: + properties: + credentials: + properties: + key: type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container - for the targets. + name: + default: "" type: string - keySecret: - description: Secret containing the client key file for the - targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + credentialsFile: + type: string + type: + type: string + type: object + azureSDConfigs: + items: + properties: + authenticationMethod: + enum: + - OAuth + - ManagedIdentity + type: string + clientID: + type: string + clientSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string - type: object - tokenRef: - description: Consul ACL TokenRef, if not provided it will use - the ACL from the local Consul Agent. + type: object + x-kubernetes-map-type: atomic + environment: + type: string + port: + type: integer + resourceGroup: + type: string + subscriptionID: + minLength: 1 + type: string + tenantID: + type: string + required: + - subscriptionID + type: object + type: array + basicAuth: + properties: + password: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - required: - - server - type: object - type: array - digitalOceanSDConfigs: - description: DigitalOceanSDConfigs defines a list of DigitalOcean - service discovery configurations. - items: - description: |- - DigitalOceanSDConfig allow retrieving scrape targets from DigitalOcean's Droplets API. - This service discovery uses the public IPv4 address by default, by that can be changed with relabeling. - See [here](https://docs.victoriametrics.com/victoriametrics/sd_configs/#digitalocean_sd_configs) - properties: - authorization: - description: Authorization header to use on every scrape request. + password_file: + type: string + username: properties: - credentials: - description: Reference to the secret with value for authorization - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization + key: type: string - type: - description: Type of authorization, default to bearer + name: + default: "" type: string + optional: + type: boolean + required: + - key type: object - followRedirects: - description: Configure whether HTTP requests follow HTTP 3xx - redirects. + x-kubernetes-map-type: atomic + type: object + bearerTokenFile: + type: string + bearerTokenSecret: + nullable: true + properties: + key: + type: string + name: + default: "" + type: string + optional: type: boolean - oauth2: - description: OAuth2 defines auth configuration - properties: - client_id: - description: The secret or configmap containing the OAuth2 - client id - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: + required: + - key + type: object + x-kubernetes-map-type: atomic + consulSDConfigs: + items: + properties: + allowStale: + type: boolean + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - type: object - client_secret: - description: The secret containing the OAuth2 client secret - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - client_secret_file: - description: ClientSecretFile defines path for client secret - file. - type: string - endpoint_params: - additionalProperties: + type: object + x-kubernetes-map-type: atomic + credentialsFile: type: string - description: Parameters to append to the token URL - type: object - proxy_url: - description: |- - The proxy URL for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - type: string - scopes: - description: OAuth2 scopes used for the token request - items: + type: type: string - type: array - tls_config: - description: |- - TLSConfig for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - x-kubernetes-preserve-unknown-fields: true - token_url: - description: The URL to fetch the token from - minLength: 1 - type: string - required: - - client_id - - token_url - type: object - port: - description: The port to scrape metrics from. - type: integer - proxy_client_config: - description: |- - ProxyClientConfig configures proxy auth settings for scraping - See [feature description](https://docs.victoriametrics.com/victoriametrics/vmagent/#scraping-targets-via-a-proxy) - properties: - basic_auth: - description: BasicAuth allow an endpoint to authenticate - over basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearer_token: - description: SecretKeySelector selects a key of a Secret. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - bearer_token_file: - type: string - tls_config: - x-kubernetes-preserve-unknown-fields: true - type: object - proxyURL: - description: ProxyURL eg http://proxyserver:2195 Directs scrapes - to proxy through this endpoint. - type: string - tlsConfig: - description: TLS configuration to use on every scrape request - properties: - ca: - description: Struct containing the CA cert to use for the - targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container to use - for the targets. - type: string - cert: - description: Struct containing the client cert file for - the targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: + type: object + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the container - for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container - for the targets. + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + datacenter: + type: string + filter: + type: string + followRedirects: + type: boolean + namespace: + type: string + nodeMeta: + additionalProperties: type: string - keySecret: - description: Secret containing the client key file for the - targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + type: object + x-kubernetes-map-type: atomic + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: + additionalProperties: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: object + proxy_url: + type: string + scopes: + items: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string - type: object - type: object - type: array - dnsSDConfigs: - description: DNSSDConfigs defines a list of DNS service discovery - configurations. - items: - description: |- - DNSSDConfig allows specifying a set of DNS domain names which are periodically queried to discover a list of targets. - The DNS servers to be contacted are read from /etc/resolv.conf. - See [here](https://docs.victoriametrics.com/victoriametrics/sd_configs/#dns_sd_configs) - properties: - names: - description: A list of DNS domain names to be queried. - items: + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url + type: object + partition: type: string - minItems: 1 - type: array - port: - description: |- - The port number used if the query type is not SRV - Ignored for SRV records - type: integer - type: - enum: - - SRV - - A - - AAAA - - MX - type: string - required: - - names - type: object - type: array - ec2SDConfigs: - description: EC2SDConfigs defines a list of EC2 service discovery - configurations. - items: - description: |- - EC2SDConfig allow retrieving scrape targets from AWS EC2 instances. - The private IP address is used by default, but may be changed to the public IP address with relabeling. - The IAM credentials used must have the ec2:DescribeInstances permission to discover scrape targets. - See [here](https://docs.victoriametrics.com/victoriametrics/sd_configs/#ec2_sd_configs) - properties: - accessKey: - description: AccessKey is the AWS API key. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + proxy_client_config: + properties: + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + bearer_token_file: + type: string + tls_config: + x-kubernetes-preserve-unknown-fields: true + type: object + proxyURL: + type: string + scheme: + enum: + - HTTP + - HTTPS + type: string + server: + minLength: 1 + type: string + services: + items: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: array + x-kubernetes-list-type: atomic + tagSeparator: + type: string + tags: + items: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - filters: - description: |- - Filters can be used optionally to filter the instance list by other criteria. - Available filter criteria can be found here: - https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html - Filter API documentation: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Filter.html - items: - description: EC2Filter is the configuration for filtering - EC2 instances. + type: array + x-kubernetes-list-type: atomic + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + tokenRef: properties: + key: + type: string name: + default: "" type: string - values: + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + required: + - server + type: object + type: array + digitalOceanSDConfigs: + items: + properties: + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + credentialsFile: + type: string + type: + type: string + type: object + followRedirects: + type: boolean + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: + additionalProperties: + type: string + type: object + proxy_url: + type: string + scopes: items: type: string type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string required: - - name - - values + - client_id + - token_url type: object - type: array - port: - description: |- - The port to scrape metrics from. If using the public IP address, this must - instead be specified in the relabeling rule. - type: integer - region: - description: The AWS region - type: string - roleARN: - description: AWS Role ARN, an alternative to using AWS API keys. - type: string - secretKey: - description: SecretKey is the AWS API secret. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - type: array - fileSDConfigs: - description: FileSDConfigs defines a list of file service discovery - configurations. - items: - description: |- - FileSDConfig defines a file service discovery configuration. - See [here](https://docs.victoriametrics.com/victoriametrics/sd_configs/#file_sd_configs) - properties: - files: - description: List of files to be used for file discovery. - items: + port: + type: integer + proxy_client_config: + properties: + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + bearer_token_file: + type: string + tls_config: + x-kubernetes-preserve-unknown-fields: true + type: object + proxyURL: type: string - minItems: 1 - type: array - required: - - files - type: object - type: array - follow_redirects: - description: FollowRedirects controls redirects for scraping. - type: boolean - gceSDConfigs: - description: GCESDConfigs defines a list of GCE service discovery - configurations. - items: - description: |- - GCESDConfig configures scrape targets from GCP GCE instances. - The private IP address is used by default, but may be changed to - the public IP address with relabeling. - See [here](https://docs.victoriametrics.com/victoriametrics/sd_configs/#gce_sd_configs) - - The GCE service discovery will load the Google Cloud credentials - from the file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable. - See https://cloud.google.com/kubernetes-engine/docs/tutorials/authenticating-to-cloud-platform - properties: - filter: - description: |- - Filter can be used optionally to filter the instance list by other criteria - Syntax of this filter is described in the filter query parameter section: - https://cloud.google.com/compute/docs/reference/latest/instances/list - type: string - port: - description: |- - The port to scrape metrics from. If using the public IP address, this must - instead be specified in the relabeling rule. - type: integer - project: - description: The Google Cloud Project ID - minLength: 1 - type: string - tagSeparator: - description: The tag separator is used to separate the tags - on concatenation - type: string - zone: - description: The zone of the scrape targets. If you need multiple - zones use multiple GCESDConfigs. - x-kubernetes-preserve-unknown-fields: true - required: - - project - - zone - type: object - type: array - honorLabels: - description: HonorLabels chooses the metric's labels on collisions - with target labels. - type: boolean - honorTimestamps: - description: HonorTimestamps controls whether vmagent respects the - timestamps present in scraped data. - type: boolean - httpSDConfigs: - description: HTTPSDConfigs defines a list of HTTP service discovery - configurations. - items: - description: |- - HTTPSDConfig defines a HTTP service discovery configuration. - See [here](https://docs.victoriametrics.com/victoriametrics/sd_configs/#http_sd_configs) - properties: - authorization: - description: Authorization header to use on every scrape request. - properties: - credentials: - description: Reference to the secret with value for authorization - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization - type: string - type: - description: Type of authorization, default to bearer + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + type: object + type: array + dnsSDConfigs: + items: + properties: + names: + items: type: string - type: object - basicAuth: - description: BasicAuth information to use on every scrape request. - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: + minItems: 1 + type: array + port: + type: integer + type: + enum: + - SRV + - A + - AAAA + - MX + type: string + required: + - names + type: object + type: array + ec2SDConfigs: + items: + properties: + accessKey: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object + type: object + x-kubernetes-map-type: atomic + filters: + items: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean + values: + items: + type: string + type: array required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - proxy_client_config: - description: |- - ProxyClientConfig configures proxy auth settings for scraping - See [feature description](https://docs.victoriametrics.com/victoriametrics/vmagent/#scraping-targets-via-a-proxy) - properties: - basic_auth: - description: BasicAuth allow an endpoint to authenticate - over basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic + - name + - values type: object - bearer_token: - description: SecretKeySelector selects a key of a Secret. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: + type: array + port: + type: integer + region: + type: string + roleARN: + type: string + secretKey: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - bearer_token_file: + type: object + x-kubernetes-map-type: atomic + type: object + type: array + fileSDConfigs: + items: + properties: + files: + items: type: string - tls_config: - x-kubernetes-preserve-unknown-fields: true - type: object - proxyURL: - description: ProxyURL eg http://proxyserver:2195 Directs scrapes - to proxy through this endpoint. - type: string - tlsConfig: - description: TLS configuration to use on every scrape request - properties: - ca: - description: Struct containing the CA cert to use for the - targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: + minItems: 1 + type: array + required: + - files + type: object + type: array + follow_redirects: + type: boolean + gceSDConfigs: + items: + properties: + filter: + type: string + port: + type: integer + project: + minLength: 1 + type: string + tagSeparator: + type: string + zone: + x-kubernetes-preserve-unknown-fields: true + required: + - project + - zone + type: object + type: array + honorLabels: + type: boolean + honorTimestamps: + type: boolean + httpSDConfigs: + items: + properties: + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + credentialsFile: + type: string + type: + type: string + type: object + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + proxy_client_config: + properties: + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: + type: object + x-kubernetes-map-type: atomic + bearer_token_file: + type: string + tls_config: + x-kubernetes-preserve-unknown-fields: true + type: object + proxyURL: + type: string + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container to use - for the targets. - type: string - cert: - description: Struct containing the client cert file for - the targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + url: + minLength: 1 + pattern: ^http(s)?://.+$ + type: string + required: + - url + type: object + type: array + interval: + type: string + kubernetesSDConfigs: + items: + properties: + apiServer: + type: string + attach_metadata: + properties: + namespace: + type: boolean + node: + type: boolean + type: object + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: + type: object + x-kubernetes-map-type: atomic + credentialsFile: + type: string + type: + type: string + type: object + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the container - for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container - for the targets. - type: string - keySecret: - description: Secret containing the client key file for the - targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + followRedirects: + type: boolean + namespaces: + properties: + names: + items: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string - type: object - url: - description: URL from which the targets are fetched. - minLength: 1 - pattern: ^http(s)?://.+$ - type: string - required: - - url - type: object - type: array - interval: - description: Interval at which metrics should be scraped - type: string - kubernetesSDConfigs: - description: KubernetesSDConfigs defines a list of Kubernetes service - discovery configurations. - items: - description: |- - KubernetesSDConfig allows retrieving scrape targets from Kubernetes' REST API. - See [here](https://docs.victoriametrics.com/victoriametrics/sd_configs/#kubernetes_sd_configs) - properties: - apiServer: - description: |- - The API server address consisting of a hostname or IP address followed - by an optional port number. - If left empty, assuming process is running inside - of the cluster. It will discover API servers automatically and use the pod's - CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/. - type: string - attach_metadata: - description: AttachMetadata configures metadata attaching from - service discovery - properties: - namespace: - description: |- - Namespace instructs vmagent to add namespace specific metadata from service discovery - Valid for roles: pod, service, endpoints, endpointslice, ingress. - type: boolean - node: - description: |- - Node instructs vmagent to add node specific metadata from service discovery - Valid for roles: pod, endpoints, endpointslice. - type: boolean - type: object - authorization: - description: Authorization header to use on every scrape request. - properties: - credentials: - description: Reference to the secret with value for authorization - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + type: array + ownNamespace: + type: boolean + type: object + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: + additionalProperties: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: object + proxy_url: + type: string + scopes: + items: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization - type: string - type: - description: Type of authorization, default to bearer - type: string - type: object - basicAuth: - description: BasicAuth information to use on every scrape request. - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url + type: object + proxy_client_config: + properties: + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + bearer_token_file: + type: string + tls_config: + x-kubernetes-preserve-unknown-fields: true + type: object + proxyURL: + type: string + role: + type: string + selectors: + items: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + field: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + label: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + role: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean required: - - key + - role type: object - x-kubernetes-map-type: atomic - type: object - followRedirects: - description: Configure whether HTTP requests follow HTTP 3xx - redirects. - type: boolean - namespaces: - description: Optional namespace discovery. If omitted, discover - targets across all namespaces. - properties: - names: - description: |- - List of namespaces where to watch for resources. - If empty and `ownNamespace` isn't true, watch for resources in all namespaces. - items: + type: array + x-kubernetes-list-map-keys: + - role + x-kubernetes-list-type: map + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: type: string - type: array - ownNamespace: - description: Includes the namespace in which the pod exists - to the list of watched namespaces. - type: boolean - type: object - oauth2: - description: OAuth2 defines auth configuration - properties: - client_id: - description: The secret or configmap containing the OAuth2 - client id - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - type: object - client_secret: - description: The secret containing the OAuth2 client secret + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + required: + - role + type: object + type: array + max_scrape_size: + type: string + metricRelabelConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + oauth2: + properties: + client_id: + properties: + configMap: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - client_secret_file: - description: ClientSecretFile defines path for client secret - file. - type: string - endpoint_params: - additionalProperties: - type: string - description: Parameters to append to the token URL + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key type: object - proxy_url: - description: |- - The proxy URL for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: type: string - scopes: - description: OAuth2 scopes used for the token request - items: - type: string - type: array - tls_config: - description: |- - TLSConfig for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - x-kubernetes-preserve-unknown-fields: true - token_url: - description: The URL to fetch the token from - minLength: 1 + name: + default: "" type: string + optional: + type: boolean required: - - client_id - - token_url + - key type: object - proxy_client_config: - description: |- - ProxyClientConfig configures proxy auth settings for scraping - See [feature description](https://docs.victoriametrics.com/victoriametrics/vmagent/#scraping-targets-via-a-proxy) - properties: - basic_auth: - description: BasicAuth allow an endpoint to authenticate - over basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: + additionalProperties: + type: string + type: object + proxy_url: + type: string + scopes: + items: + type: string + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url + type: object + openstackSDConfigs: + items: + properties: + allTenants: + type: boolean + applicationCredentialId: + type: string + applicationCredentialName: + type: string + applicationCredentialSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + availability: + enum: + - Public + - public + - Admin + - admin + - Internal + - internal + type: string + domainID: + type: string + domainName: + type: string + identityEndpoint: + type: string + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + port: + type: integer + projectID: + type: string + projectName: + type: string + region: + minLength: 1 + type: string + role: + enum: + - Instance + - instance + - Hypervisor + - hypervisor + type: string + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + userid: + type: string + username: + type: string + required: + - region + - role + type: object + type: array + params: + additionalProperties: + items: + type: string + type: array + type: object + path: + type: string + proxyURL: + type: string + relabelConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + sampleLimit: + type: integer + scheme: + enum: + - http + - https + - HTTPS + - HTTP + type: string + scrape_interval: + type: string + scrapeClass: + type: string + scrapeTimeout: + type: string + seriesLimit: + type: integer + staticConfigs: + items: + properties: + labels: + additionalProperties: + type: string + type: object + x-kubernetes-map-type: atomic + targets: + items: + type: string + type: array + type: object + type: array + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic + name: + default: "" + type: string + optional: + type: boolean + required: + - key type: object - bearer_token: - description: SecretKeySelector selects a key of a Secret. + x-kubernetes-map-type: atomic + secret: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - bearer_token_file: - type: string - tls_config: - x-kubernetes-preserve-unknown-fields: true type: object - proxyURL: - description: ProxyURL eg http://proxyserver:2195 Directs scrapes - to proxy through this endpoint. - type: string - role: - description: Role of the Kubernetes entities that should be - discovered. + caFile: type: string - selectors: - description: Selector to select objects. - items: - description: K8SSelectorConfig is Kubernetes Selector Config - properties: - field: - type: string - label: - type: string - role: - type: string - required: - - role - type: object - type: array - x-kubernetes-list-map-keys: - - role - x-kubernetes-list-type: map - tlsConfig: - description: TLS configuration to use on every scrape request + cert: properties: - ca: - description: Struct containing the CA cert to use for the - targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container to use - for the targets. - type: string - cert: - description: Struct containing the client cert file for - the targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the container - for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container - for the targets. - type: string - keySecret: - description: Secret containing the client key file for the - targets. + configMap: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string - type: object - required: - - role - type: object - type: array - max_scrape_size: - description: MaxScrapeSize defines a maximum size of scraped data - for a job - type: string - metricRelabelConfigs: - description: MetricRelabelConfigs to apply to samples after scrapping. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling - properties: - action: - description: Action to perform based on regex matching. Default - is 'replace' - type: string - if: - description: 'If represents metricsQL match expression (or list - of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for `action: - graphite`' - type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source label - values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source label - values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: - type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - oauth2: - description: OAuth2 defines auth configuration - properties: - client_id: - description: The secret or configmap containing the OAuth2 client - id - properties: - configMap: - description: ConfigMap containing data to use for the targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - client_secret: - description: The secret containing the OAuth2 client secret - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - client_secret_file: - description: ClientSecretFile defines path for client secret file. - type: string - endpoint_params: - additionalProperties: - type: string - description: Parameters to append to the token URL - type: object - proxy_url: - description: |- - The proxy URL for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - type: string - scopes: - description: OAuth2 scopes used for the token request - items: - type: string - type: array - tls_config: - description: |- - TLSConfig for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - x-kubernetes-preserve-unknown-fields: true - token_url: - description: The URL to fetch the token from - minLength: 1 - type: string - required: - - client_id - - token_url - type: object - openstackSDConfigs: - description: OpenStackSDConfigs defines a list of OpenStack service - discovery configurations. - items: - description: |- - OpenStackSDConfig allow retrieving scrape targets from OpenStack Nova instances. - See [here](https://docs.victoriametrics.com/victoriametrics/sd_configs/#openstack_sd_configs) - properties: - allTenants: - description: |- - Whether the service discovery should list all instances for all projects. - It is only relevant for the 'instance' role and usually requires admin permissions. - type: boolean - applicationCredentialId: - description: ApplicationCredentialID - type: string - applicationCredentialName: - description: |- - The ApplicationCredentialID or ApplicationCredentialName fields are - required if using an application credential to authenticate. Some providers - allow you to create an application credential to authenticate rather than a - password. - type: string - applicationCredentialSecret: - description: |- - The applicationCredentialSecret field is required if using an application - credential to authenticate. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - availability: - description: Availability of the endpoint to connect to. - enum: - - Public - - public - - Admin - - admin - - Internal - - internal - type: string - domainID: - description: DomainID - type: string - domainName: - description: |- - At most one of domainId and domainName must be provided if using username - with Identity V3. Otherwise, either are optional. - type: string - identityEndpoint: - description: |- - IdentityEndpoint specifies the HTTP endpoint that is required to work with - the Identity API of the appropriate version. - type: string - password: - description: |- - Password for the Identity V2 and V3 APIs. Consult with your provider's - control panel to discover your account's preferred method of authentication. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - port: - description: |- - The port to scrape metrics from. If using the public IP address, this must - instead be specified in the relabeling rule. - type: integer - projectID: - description: ' ProjectID' - type: string - projectName: - description: |- - The ProjectId and ProjectName fields are optional for the Identity V2 API. - Some providers allow you to specify a ProjectName instead of the ProjectId. - Some require both. Your provider's authentication policies will determine - how these fields influence authentication. - type: string - region: - description: The OpenStack Region. - minLength: 1 - type: string - role: - description: The OpenStack role of entities that should be discovered. - enum: - - Instance - - instance - - Hypervisor - - hypervisor - type: string - tlsConfig: - description: TLS configuration to use on every scrape request - properties: - ca: - description: Struct containing the CA cert to use for the - targets. + secret: properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key type: object - caFile: - description: Path to the CA cert in the container to use - for the targets. + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: type: string - cert: - description: Struct containing the client cert file for - the targets. + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + vm_scrape_params: + properties: + disable_compression: + type: boolean + disable_keep_alive: + type: boolean + headers: + items: + type: string + type: array + no_stale_markers: + type: boolean + proxy_client_config: + properties: + basic_auth: properties: - configMap: - description: ConfigMap containing data to use for the - targets. + password: properties: key: - description: The key to select. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the ConfigMap or its - key must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. + password_file: + type: string + username: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key - must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic type: object - certFile: - description: Path to the client cert file in the container - for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container - for the targets. - type: string - keySecret: - description: Secret containing the client key file for the - targets. + bearer_token: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. + bearer_token_file: type: string + tls_config: + x-kubernetes-preserve-unknown-fields: true type: object - userid: - description: UserID + scrape_align_interval: type: string - username: - description: |- - Username is required if using Identity V2 API. Consult with your provider's - control panel to discover your account's username. - In Identity V3, either userid or a combination of username - and domainId or domainName are needed + scrape_offset: type: string - required: - - region - - role + stream_parse: + type: boolean type: object - type: array - params: - additionalProperties: + type: object + status: + properties: + conditions: items: - type: string - type: array - description: Optional HTTP URL parameters - type: object - path: - description: HTTP path to scrape for metrics. - type: string - proxyURL: - description: ProxyURL eg http://proxyserver:2195 Directs scrapes to - proxy through this endpoint. - type: string - relabelConfigs: - description: RelabelConfigs to apply to samples during service discovery. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling - properties: - action: - description: Action to perform based on regex matching. Default - is 'replace' - type: string - if: - description: 'If represents metricsQL match expression (or list - of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: + properties: + lastTransitionTime: + format: date-time type: string - description: 'Labels is used together with Match for `action: - graphite`' - type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source label - values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source label - values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: + lastUpdateTime: + format: date-time type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: + message: + maxLength: 32768 type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - sampleLimit: - description: SampleLimit defines per-scrape limit on number of scraped - samples that will be accepted. - type: integer - scheme: - description: HTTP scheme to use for scraping. - enum: - - http - - https - - HTTPS - - HTTP - type: string - scrape_interval: - description: |- - ScrapeInterval is the same as Interval and has priority over it. - one of scrape_interval or interval can be used - type: string - scrapeClass: - description: ScrapeClass defined scrape class to apply - type: string - scrapeTimeout: - description: Timeout after which the scrape is ended - type: string - seriesLimit: - description: |- - SeriesLimit defines per-scrape limit on number of unique time series - a single target can expose during all the scrapes on the time window of 24h. - type: integer - staticConfigs: - description: StaticConfigs defines a list of static targets with a - common label set. - items: - description: |- - StaticConfig defines a static configuration. - See [here](https://docs.victoriametrics.com/victoriametrics/sd_configs/#static_configs) - properties: - labels: - additionalProperties: + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 type: string - description: Labels assigned to all metrics scraped from the - targets. - type: object - x-kubernetes-map-type: atomic - targets: - description: List of targets for this static configuration. - items: + status: + enum: + - "True" + - "False" + - Unknown type: string - type: array + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.18.0 + name: vmservicescrapes.operator.victoriametrics.com +spec: + group: operator.victoriametrics.com + names: + kind: VMServiceScrape + listKind: VMServiceScrapeList + plural: vmservicescrapes + singular: vmservicescrape + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.updateStatus + name: Status + type: string + - jsonPath: .status.reason + name: Sync Error + type: string + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + attach_metadata: + properties: + namespace: + type: boolean + node: + type: boolean type: object - type: array - tlsConfig: - description: TLSConfig configuration to use when scraping the endpoint - properties: - ca: - description: Struct containing the CA cert to use for the targets. + discoveryRole: + enum: + - endpoints + - service + - endpointslices + type: string + endpoints: + items: properties: - configMap: - description: ConfigMap containing data to use for the targets. + attach_metadata: properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined + namespace: + type: boolean + node: type: boolean - required: - - key type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. + authorization: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + credentialsFile: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container to use for the - targets. - type: string - cert: - description: Struct containing the client cert file for the targets. - properties: - configMap: - description: ConfigMap containing data to use for the targets. + basicAuth: properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean - required: - - key + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. + bearerTokenFile: + type: string + bearerTokenSecret: + nullable: true properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the container for - the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container for - the targets. - type: string - keySecret: - description: Secret containing the client key file for the targets. - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined + follow_redirects: type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string - type: object - vm_scrape_params: - description: VMScrapeParams defines VictoriaMetrics specific scrape - parameters - properties: - disable_compression: - description: DisableCompression - type: boolean - disable_keep_alive: - description: |- - disable_keepalive allows disabling HTTP keep-alive when scraping targets. - By default, HTTP keep-alive is enabled, so TCP connections to scrape targets - could be reused. - See https://docs.victoriametrics.com/victoriametrics/vmagent/#scrape_config-enhancements - type: boolean - headers: - description: |- - Headers allows sending custom headers to scrape targets - must be in of semicolon separated header with it's value - eg: - headerName: headerValue - vmagent supports since 1.79.0 version - items: - type: string - type: array - no_stale_markers: - type: boolean - proxy_client_config: - description: |- - ProxyClientConfig configures proxy auth settings for scraping - See feature description https://docs.victoriametrics.com/victoriametrics/vmagent/#scraping-targets-via-a-proxy - properties: - basic_auth: - description: BasicAuth allow an endpoint to authenticate over - basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + honorLabels: + type: boolean + honorTimestamps: + type: boolean + interval: + type: string + max_scrape_size: + type: string + metricRelabelConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object + client_secret: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key - must be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - type: object - bearer_token: - description: SecretKeySelector selects a key of a Secret. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - bearer_token_file: - type: string - tls_config: - x-kubernetes-preserve-unknown-fields: true - type: object - scrape_align_interval: - type: string - scrape_offset: - type: string - stream_parse: - type: boolean - type: object - type: object - status: - description: ScrapeObjectStatus defines the observed state of ScrapeObjects - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 - type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.18.0 - name: vmservicescrapes.operator.victoriametrics.com -spec: - group: operator.victoriametrics.com - names: - kind: VMServiceScrape - listKind: VMServiceScrapeList - plural: vmservicescrapes - singular: vmservicescrape - scope: Namespaced - versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.updateStatus - name: Status - type: string - - jsonPath: .status.reason - name: Sync Error - type: string - name: v1beta1 - schema: - openAPIV3Schema: - description: |- - VMServiceScrape is scrape configuration for endpoints associated with - kubernetes service, - it generates scrape configuration for vmagent based on selectors. - result config will scrape service endpoints - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VMServiceScrapeSpec defines the desired state of VMServiceScrape - properties: - attach_metadata: - description: AttachMetadata configures metadata attaching from service - discovery - properties: - namespace: - description: |- - Namespace instructs vmagent to add namespace specific metadata from service discovery - Valid for roles: pod, service, endpoints, endpointslice, ingress. - type: boolean - node: - description: |- - Node instructs vmagent to add node specific metadata from service discovery - Valid for roles: pod, endpoints, endpointslice. - type: boolean - type: object - discoveryRole: - description: |- - DiscoveryRole - defines kubernetes_sd role for objects discovery. - by default, its endpoints. - can be changed to service or endpointslices. - note, that with service setting, you have to use port: "name" - and cannot use targetPort for endpoints. - enum: - - endpoints - - service - - endpointslices - type: string - endpoints: - description: A list of endpoints allowed as part of this ServiceScrape. - items: - description: Endpoint defines a scrapeable endpoint serving metrics. - properties: - attach_metadata: - description: AttachMetadata configures metadata attaching from - service discovery - properties: - namespace: - description: |- - Namespace instructs vmagent to add namespace specific metadata from service discovery - Valid for roles: pod, service, endpoints, endpointslice, ingress. - type: boolean - node: - description: |- - Node instructs vmagent to add node specific metadata from service discovery - Valid for roles: pod, endpoints, endpointslice. - type: boolean - type: object - authorization: - description: Authorization with http header Authorization - properties: - credentials: - description: Reference to the secret with value for authorization - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization - type: string - type: - description: Type of authorization, default to bearer - type: string - type: object - basicAuth: - description: BasicAuth allow an endpoint to authenticate over - basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearerTokenFile: - description: File to read bearer token for scraping targets. - type: string - bearerTokenSecret: - description: |- - Secret to mount to read bearer token for scraping targets. The secret - needs to be in the same namespace as the scrape object and accessible by - the victoria-metrics operator. - nullable: true - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - follow_redirects: - description: FollowRedirects controls redirects for scraping. - type: boolean - honorLabels: - description: HonorLabels chooses the metric's labels on collisions - with target labels. - type: boolean - honorTimestamps: - description: HonorTimestamps controls whether vmagent respects - the timestamps present in scraped data. - type: boolean - interval: - description: Interval at which metrics should be scraped - type: string - max_scrape_size: - description: MaxScrapeSize defines a maximum size of scraped - data for a job - type: string - metricRelabelConfigs: - description: MetricRelabelConfigs to apply to samples after - scrapping. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling - properties: - action: - description: Action to perform based on regex matching. - Default is 'replace' + client_secret_file: type: string - if: - description: 'If represents metricsQL match expression - (or list of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: + endpoint_params: additionalProperties: type: string - description: 'Labels is used together with Match for `action: - graphite`' type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' + proxy_url: type: string - modulus: - description: Modulus to take of the hash of the source - label values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source - label values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. + scopes: items: type: string type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. + required: + - client_id + - token_url + type: object + params: + additionalProperties: + items: type: string + type: array type: object - type: array - oauth2: - description: OAuth2 defines auth configuration - properties: - client_id: - description: The secret or configmap containing the OAuth2 - client id + path: + type: string + port: + type: string + proxyURL: + type: string + relabelConfigs: + items: properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string type: object - x-kubernetes-map-type: atomic - type: object - client_secret: - description: The secret containing the OAuth2 client secret - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + match: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - client_secret_file: - description: ClientSecretFile defines path for client secret - file. - type: string - endpoint_params: - additionalProperties: - type: string - description: Parameters to append to the token URL - type: object - proxy_url: - description: |- - The proxy URL for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - type: string - scopes: - description: OAuth2 scopes used for the token request - items: - type: string - type: array - tls_config: - description: |- - TLSConfig for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - x-kubernetes-preserve-unknown-fields: true - token_url: - description: The URL to fetch the token from - minLength: 1 - type: string - required: - - client_id - - token_url - type: object - params: - additionalProperties: - items: - type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object type: array - description: Optional HTTP URL parameters - type: object - path: - description: HTTP path to scrape for metrics. - type: string - port: - description: Name of the port exposed at Service. - type: string - proxyURL: - description: ProxyURL eg http://proxyserver:2195 Directs scrapes - to proxy through this endpoint. - type: string - relabelConfigs: - description: RelabelConfigs to apply to samples during service - discovery. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling + sampleLimit: + type: integer + scheme: + enum: + - http + - https + - HTTPS + - HTTP + type: string + scrape_interval: + type: string + scrapeTimeout: + type: string + seriesLimit: + type: integer + targetPort: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + tlsConfig: properties: - action: - description: Action to perform based on regex matching. - Default is 'replace' + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: type: string - if: - description: 'If represents metricsQL match expression - (or list of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for `action: - graphite`' + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' + certFile: type: string - modulus: - description: Modulus to take of the hash of the source - label values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source - label values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: - type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 + insecureSkipVerify: + type: boolean + keyFile: type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: type: string type: object - type: array - sampleLimit: - description: SampleLimit defines per-scrape limit on number - of scraped samples that will be accepted. - type: integer - scheme: - description: HTTP scheme to use for scraping. - enum: - - http - - https - - HTTPS - - HTTP - type: string - scrape_interval: - description: |- - ScrapeInterval is the same as Interval and has priority over it. - one of scrape_interval or interval can be used - type: string - scrapeTimeout: - description: Timeout after which the scrape is ended - type: string - seriesLimit: - description: |- - SeriesLimit defines per-scrape limit on number of unique time series - a single target can expose during all the scrapes on the time window of 24h. - type: integer - targetPort: - anyOf: - - type: integer - - type: string - description: |- - TargetPort - Name or number of the pod port this endpoint refers to. Mutually exclusive with port. - x-kubernetes-int-or-string: true - tlsConfig: - description: TLSConfig configuration to use when scraping the - endpoint - properties: - ca: - description: Struct containing the CA cert to use for the - targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container to use - for the targets. - type: string - cert: - description: Struct containing the client cert file for - the targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the container - for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container - for the targets. - type: string - keySecret: - description: Secret containing the client key file for the - targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + vm_scrape_params: + properties: + disable_compression: + type: boolean + disable_keep_alive: + type: boolean + headers: + items: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string - type: object - vm_scrape_params: - description: VMScrapeParams defines VictoriaMetrics specific - scrape parameters - properties: - disable_compression: - description: DisableCompression - type: boolean - disable_keep_alive: - description: |- - disable_keepalive allows disabling HTTP keep-alive when scraping targets. - By default, HTTP keep-alive is enabled, so TCP connections to scrape targets - could be reused. - See https://docs.victoriametrics.com/victoriametrics/vmagent/#scrape_config-enhancements - type: boolean - headers: - description: |- - Headers allows sending custom headers to scrape targets - must be in of semicolon separated header with it's value - eg: - headerName: headerValue - vmagent supports since 1.79.0 version - items: - type: string - type: array - no_stale_markers: - type: boolean - proxy_client_config: - description: |- - ProxyClientConfig configures proxy auth settings for scraping - See feature description https://docs.victoriametrics.com/victoriametrics/vmagent/#scraping-targets-via-a-proxy - properties: - basic_auth: - description: BasicAuth allow an endpoint to authenticate - over basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: + type: array + no_stale_markers: + type: boolean + proxy_client_config: + properties: + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - type: object - bearer_token: - description: SecretKeySelector selects a key of a Secret. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - bearer_token_file: - type: string - tls_config: - x-kubernetes-preserve-unknown-fields: true - type: object - scrape_align_interval: - type: string - scrape_offset: - type: string - stream_parse: - type: boolean - type: object + type: object + x-kubernetes-map-type: atomic + bearer_token_file: + type: string + tls_config: + x-kubernetes-preserve-unknown-fields: true + type: object + scrape_align_interval: + type: string + scrape_offset: + type: string + stream_parse: + type: boolean + type: object + type: object + type: array + jobLabel: + type: string + namespaceSelector: + properties: + any: + type: boolean + matchNames: + items: + type: string + type: array type: object - type: array - jobLabel: - description: The label to use to retrieve the job name from. - type: string - namespaceSelector: - description: Selector to select which namespaces the Endpoints objects - are discovered from. - properties: - any: - description: |- - Boolean describing whether all namespaces are selected in contrast to a - list restricting them. - type: boolean - matchNames: - description: List of namespace names. - items: - type: string - type: array - type: object - podTargetLabels: - description: PodTargetLabels transfers labels on the Kubernetes Pod - onto the target. - items: + podTargetLabels: + items: + type: string + type: array + sampleLimit: + type: integer + scrapeClass: type: string - type: array - sampleLimit: - description: SampleLimit defines per-scrape limit on number of scraped - samples that will be accepted. - type: integer - scrapeClass: - description: ScrapeClass defined scrape class to apply - type: string - selector: - description: Selector to select Endpoints objects by corresponding - Service labels. - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. - The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector applies - to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: + selector: + properties: + matchExpressions: + items: + properties: + key: type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. + type: object + x-kubernetes-map-type: atomic + seriesLimit: + type: integer + targetLabels: + items: + type: string + type: array + required: + - endpoints + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type type: object - type: object - x-kubernetes-map-type: atomic - seriesLimit: - description: |- - SeriesLimit defines per-scrape limit on number of unique time series - a single target can expose during all the scrapes on the time window of 24h. - type: integer - targetLabels: - description: TargetLabels transfers labels on the Kubernetes Service - onto the target. - items: + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: type: string - type: array - required: - - endpoints - type: object - status: - description: ScrapeObjectStatus defines the observed state of ScrapeObjects - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 - type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - required: - - spec - type: object - served: true - storage: true - subresources: - status: {} + updateStatus: + type: string + type: object + required: + - spec + type: object + served: true + storage: true + subresources: + status: {} --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -37809,1925 +45968,962 @@ spec: singular: vmsingle scope: Namespaced versions: - - additionalPrinterColumns: - - description: Current status of single node update process - jsonPath: .status.updateStatus - name: Status - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1beta1 - schema: - openAPIV3Schema: - description: VMSingle is fast, cost-effective and scalable time-series database. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VMSingleSpec defines the desired state of VMSingle - properties: - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: - type: string - type: array - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to run - within a pod. - required: - - name + - additionalPrinterColumns: + - jsonPath: .status.updateStatus + name: Status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + affinity: type: object x-kubernetes-preserve-unknown-fields: true - type: array - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: - x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. - properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this DNS resolver option's value. - type: string - type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application container - items: - description: EnvVar represents an environment variable present in - a Container. + configMaps: + items: + type: string + type: array + containers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string - required: - - name + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic type: object - x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of ConfigMaps - or Secrets - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + dnsPolicy: + type: string + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + host_aliases: + items: + properties: + hostnames: + items: type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostAliases: + items: + properties: + hostnames: + items: type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + image: properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. + pullPolicy: type: string - required: - - ip - type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. + repository: type: string - required: - - ip - type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the node - network namespace - type: boolean - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image + it's repository - if needed - type: string - tag: - description: Tag contains desired docker image version - type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + tag: type: string type: object - x-kubernetes-map-type: atomic - type: array - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to run - within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - insertPorts: - description: InsertPorts - additional listen ports for data ingestion. - properties: - graphitePort: - description: GraphitePort listen port - type: string - influxPort: - description: InfluxPort listen port - type: string - openTSDBHTTPPort: - description: OpenTSDBHTTPPort for http connections. - type: string - openTSDBPort: - description: OpenTSDBPort for tcp and udp listen - type: string - type: object - license: - description: |- - License allows to configure license key to be used for enterprise features. - Using license key is supported starting from VictoriaMetrics v1.94.0. - See [here](https://docs.victoriametrics.com/victoriametrics/enterprise/) - properties: - forceOffline: - description: Enforce offline verification of the license key. - type: boolean - key: - description: |- - Enterprise license key. This flag is available only in [VictoriaMetrics enterprise](https://docs.victoriametrics.com/victoriametrics/enterprise/). - To request a trial license, [go to](https://victoriametrics.com/products/enterprise/trial) - type: string - keyRef: - description: KeyRef is reference to secret with license key for - enterprise features. + imagePullSecrets: + items: properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key + type: string type: object x-kubernetes-map-type: atomic - reloadInterval: - description: Interval to be used for checking for license key - changes. Note that this is only applicable when using KeyRef. - type: string - type: object - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logFormat: - description: LogFormat for VMSingle to be configured with. - enum: - - default - - json - type: string - logLevel: - description: LogLevel for victoria metrics single to be configured - with. - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - managedMetadata: - description: |- - ManagedMetadata defines metadata that will be added to the all objects - created by operator for the given CustomResource - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations + type: array + initContainers: + items: + required: + - name type: object - labels: - additionalProperties: + x-kubernetes-preserve-unknown-fields: true + type: array + insertPorts: + properties: + graphitePort: type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - type: object - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - nodeSelector: - additionalProperties: - type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - podMetadata: - description: PodMetadata configures Labels and Annotations which are - propagated to the VMSingle pods. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - port: - description: Port listen address - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods - type: string - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod condition + influxPort: + type: string + openTSDBHTTPPort: + type: string + openTSDBPort: + type: string + type: object + license: properties: - conditionType: - description: ConditionType refers to a condition in the pod's - condition list with matching type. + forceOffline: + type: boolean + key: type: string - required: - - conditionType - type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - removePvcAfterDelete: - description: |- - RemovePvcAfterDelete - if true, controller adds ownership to pvc - and after VMSingle object deletion - pvc will be garbage collected - by controller manager - type: boolean - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. + keyRef: properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. + key: type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. + name: + default: "" type: string + optional: + type: boolean required: - - name + - key type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - retentionPeriod: - description: |- - RetentionPeriod defines how long to retain stored metrics, specified as a duration (e.g., "1d", "1w", "1m"). - Data with timestamps outside the RetentionPeriod is automatically deleted. The minimum allowed value is 1d, or 24h. - The default value is 1 (one month). - See [retention](https://docs.victoriametrics.com/victoriametrics/single-server-victoriametrics/#retention) docs for details. - pattern: ^[0-9]+(h|d|w|y)?$ - type: string - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: + x-kubernetes-map-type: atomic + reloadInterval: + type: string + type: object + livenessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + logFormat: + enum: + - default + - json type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - serviceAccountName: - description: ServiceAccountName is the name of the ServiceAccount - to use to run the pods - type: string - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vmsingle VMServiceScrape - spec - required: - - endpoints - type: object - x-kubernetes-preserve-unknown-fields: true - serviceSpec: - description: ServiceSpec that will be added to vmsingle service spec - properties: - metadata: - description: EmbeddedObjectMetadata defines objectMeta for additional - service. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + managedMetadata: + properties: + annotations: + additionalProperties: type: string - type: object - spec: - description: |- - ServiceSpec describes the attributes that a user creates on a service. - More info: https://kubernetes.io/docs/concepts/services-networking/service/ - type: object - x-kubernetes-preserve-unknown-fields: true - useAsDefault: - description: |- - UseAsDefault applies changes from given service definition to the main object Service - Changing from headless service to clusterIP or loadbalancer may break cross-component communication - type: boolean - required: - - spec - type: object - startupProbe: - description: StartupProbe that will be added to CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - storage: - description: |- - Storage is the definition of how storage will be used by the VMSingle - by default it`s empty dir - this option is ignored if storageDataPath is set - properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: - type: string - type: array - x-kubernetes-list-type: atomic - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. - properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. + type: object + labels: + additionalProperties: type: string - kind: - description: Kind is the type of resource being referenced + type: object + type: object + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + podMetadata: + properties: + annotations: + additionalProperties: type: string - name: - description: Name is the name of resource being referenced + type: object + labels: + additionalProperties: type: string - required: - - kind - - name - type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + type: object + name: + type: string + type: object + port: + type: string + priorityClassName: + type: string + readinessGates: + items: properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. - type: string - kind: - description: Kind is the type of resource being referenced - type: string - name: - description: Name is the name of resource being referenced - type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + conditionType: type: string required: - - kind - - name + - conditionType type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: + type: array + readinessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + removePvcAfterDelete: + type: boolean + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: - type: integer - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: - type: integer - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - selector: - description: selector is a label query over volumes to consider - for binding. - properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + retentionPeriod: + pattern: ^[0-9]+(h|d|w|y)?$ + type: string + revisionHistoryLimitCount: + format: int32 + type: integer + runtimeClassName: + type: string + schedulerName: + type: string + secrets: + items: + type: string + type: array + securityContext: + type: object + x-kubernetes-preserve-unknown-fields: true + serviceAccountName: + type: string + serviceScrapeSpec: + required: + - endpoints + type: object + x-kubernetes-preserve-unknown-fields: true + serviceSpec: + properties: + metadata: + properties: + annotations: + additionalProperties: + type: string type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: + labels: + additionalProperties: + type: string + type: object + name: type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string or nil value indicates that no - VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, - this field can be reset to its previous value (including nil) to cancel the modification. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - storageDataPath: - description: |- - StorageDataPath disables spec.storage option and overrides arg for victoria-metrics binary --storageDataPath, - its users responsibility to mount proper device into given path. - It requires to provide spec.volumes and spec.volumeMounts with at least 1 value - type: string - storageMetadata: - description: StorageMeta defines annotations and labels attached to - PVC for given vmsingle CR - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - streamAggrConfig: - description: StreamAggrConfig defines stream aggregation configuration - for VMSingle - properties: - configmap: - description: ConfigMap with stream aggregation rules - properties: - key: - description: The key to select. + type: object + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + useAsDefault: + type: boolean + required: + - spec + type: object + startupProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + storage: + properties: + accessModes: + items: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - dedupInterval: - description: Allows setting different de-duplication intervals - per each configured remote storage - type: string - dropInput: - description: Allow drop all the input samples after the aggregation - type: boolean - dropInputLabels: - description: labels to drop from samples for aggregator before - stream de-duplication and aggregation - items: - type: string - type: array - enableWindows: - description: EnableWindows enables aggregating data in separate - windows ( available from v0.54.0). - type: boolean - ignoreFirstIntervals: - description: IgnoreFirstIntervals instructs to ignore first interval - type: integer - ignoreFirstSampleInterval: - description: IgnoreFirstSampleInterval sets interval for total - and prometheus_total during which first samples will be ignored - type: string - ignoreOldSamples: - description: IgnoreOldSamples instructs to ignore samples with - old timestamps outside the current aggregation interval. - type: boolean - keepInput: - description: Allows writing both raw and aggregate data - type: boolean - rules: - description: Stream aggregation rules - items: - description: StreamAggrRule defines the rule in stream aggregation - config + type: array + x-kubernetes-list-type: atomic + dataSource: properties: - by: - description: |- - By is an optional list of labels for grouping input series. - - See also Without. - - If neither By nor Without are set, then the Outputs are calculated - individually per each input time series. - items: - type: string - type: array - dedup_interval: - description: DedupInterval is an optional interval for deduplication. - type: string - drop_input_labels: - description: |- - DropInputLabels is an optional list with labels, which must be dropped before further processing of input samples. - - Labels are dropped before de-duplication and aggregation. - items: - type: string - type: array - enable_windows: - description: EnableWindows enables aggregating data in separate - windows - type: boolean - flush_on_shutdown: - description: |- - FlushOnShutdown defines whether to flush the aggregation state on process termination - or config reload. Is `false` by default. - It is not recommended changing this setting, unless unfinished aggregations states - are preferred to missing data points. - type: boolean - ignore_first_intervals: - type: integer - ignore_old_samples: - description: IgnoreOldSamples instructs to ignore samples - with old timestamps outside the current aggregation interval. - type: boolean - ignoreFirstSampleInterval: - description: IgnoreFirstSampleInterval sets interval for - total and prometheus_total during which first samples - will be ignored - type: string - input_relabel_configs: - description: |- - InputRelabelConfigs is an optional relabeling rules, which are applied on the input - before aggregation. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling - properties: - action: - description: Action to perform based on regex matching. - Default is 'replace' - type: string - if: - description: 'If represents metricsQL match expression - (or list of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for - `action: graphite`' - type: object - match: - description: 'Match is used together with Labels for - `action: graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source - label values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated - source label values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: - type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string - type: object - type: array - interval: - description: Interval is the interval between aggregations. + apiGroup: type: string - keep_metric_names: - description: KeepMetricNames instructs to leave metric names - as is for the output time series without adding any suffix. - type: boolean - match: - description: |- - Match is a label selector (or list of label selectors) for filtering time series for the given selector. - - If the match isn't set, then all the input time series are processed. - x-kubernetes-preserve-unknown-fields: true - no_align_flush_to_interval: - description: |- - NoAlignFlushToInterval disables aligning of flushes to multiples of Interval. - By default flushes are aligned to Interval. - type: boolean - output_relabel_configs: - description: |- - OutputRelabelConfigs is an optional relabeling rules, which are applied - on the aggregated output before being sent to remote storage. + kind: + type: string + name: + type: string + required: + - kind + - name + type: object + x-kubernetes-map-type: atomic + dataSourceRef: + properties: + apiGroup: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling properties: - action: - description: Action to perform based on regex matching. - Default is 'replace' - type: string - if: - description: 'If represents metricsQL match expression - (or list of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for - `action: graphite`' - type: object - match: - description: 'Match is used together with Labels for - `action: graphite`' - type: string - modulus: - description: Modulus to take of the hash of the source - label values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' + key: type: string - separator: - description: Separator placed between concatenated - source label values. default is ';'. + operator: type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. + values: items: type: string type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string + x-kubernetes-list-type: atomic + required: + - key + - operator type: object type: array - outputs: - description: |- - Outputs is a list of output aggregate functions to produce. - - The following names are allowed: - - - total - aggregates input counters - - increase - counts the increase over input counters - - count_series - counts the input series - - count_samples - counts the input samples - - sum_samples - sums the input samples - - last - the last biggest sample value - - min - the minimum sample value - - max - the maximum sample value - - avg - the average value across all the samples - - stddev - standard deviation across all the samples - - stdvar - standard variance across all the samples - - histogram_bucket - creates VictoriaMetrics histogram for input samples - - quantiles(phi1, ..., phiN) - quantiles' estimation for phi in the range [0..1] - - The output time series will have the following names: - - input_name:aggr__ - items: - type: string - type: array - staleness_interval: - description: |- - Staleness interval is interval after which the series state will be reset if no samples have been sent during it. - The parameter is only relevant for outputs: total, total_prometheus, increase, increase_prometheus and histogram_bucket. - type: string - without: - description: |- - Without is an optional list of labels, which must be excluded when grouping input series. - - See also By. - - If neither By nor Without are set, then the Outputs are calculated - individually per each input time series. - items: + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: type: string - type: array - required: - - interval - - outputs + type: object type: object - type: array - type: object - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container graceful - termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + x-kubernetes-map-type: atomic + storageClassName: + type: string + volumeAttributesClassName: + type: string + volumeMode: + type: string + volumeName: type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread matching - pods among the given topology. - required: - - maxSkew - - topologyKey - - whenUnsatisfiable type: object - x-kubernetes-preserve-unknown-fields: true - type: array - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - vmBackup: - description: VMBackup configuration for backup - properties: - acceptEULA: - description: |- - AcceptEULA accepts enterprise feature usage, must be set to true. - otherwise backupmanager cannot be added to single/cluster version. - https://victoriametrics.com/legal/esa/ - Deprecated: use license.key or license.keyRef instead - type: boolean - concurrency: - description: Defines number of concurrent workers. Higher concurrency - may reduce backup duration (default 10) - format: int32 - type: integer - credentialsSecret: - description: |- - CredentialsSecret is secret in the same namespace for access to remote storage - The secret is mounted into /etc/vm/creds. - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. + storageDataPath: + type: string + storageMetadata: + properties: + annotations: + additionalProperties: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - customS3Endpoint: - description: Custom S3 endpoint for use with S3-compatible storages - (e.g. MinIO). S3 is used if not set - type: string - destination: - description: Defines destination for backup - type: string - destinationDisableSuffixAdd: - description: |- - DestinationDisableSuffixAdd - disables suffix adding for cluster version backups - each vmstorage backup must have unique backup folder - so operator adds POD_NAME as suffix for backup destination folder. - type: boolean - disableDaily: - description: Defines if daily backups disabled (default false) - type: boolean - disableHourly: - description: Defines if hourly backups disabled (default false) - type: boolean - disableMonthly: - description: Defines if monthly backups disabled (default false) - type: boolean - disableWeekly: - description: Defines if weekly backups disabled (default false) - type: boolean - extraArgs: - additionalProperties: - type: string - description: extra args like maxBytesPerSecond default 0 - type: object - extraEnvs: - items: - description: EnvVar represents an environment variable present - in a Container. + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + streamAggrConfig: + properties: + configmap: properties: + key: + type: string name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string - valueFrom: - description: Source for the environment variable's value. - Cannot be used if value is not empty. - properties: - configMapKeyRef: - description: Selects a key of a ConfigMap. + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + dedupInterval: + type: string + dropInput: + type: boolean + dropInputLabels: + items: + type: string + type: array + enableWindows: + type: boolean + ignoreFirstIntervals: + type: integer + ignoreFirstSampleInterval: + type: string + ignoreOldSamples: + type: boolean + keepInput: + type: boolean + rules: + items: + properties: + by: + items: + type: string + type: array + dedup_interval: + type: string + drop_input_labels: + items: + type: string + type: array + enable_windows: + type: boolean + flush_on_shutdown: + type: boolean + ignore_first_intervals: + type: integer + ignore_old_samples: + type: boolean + ignoreFirstSampleInterval: + type: string + input_relabel_configs: + items: properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + action: type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - fieldRef: - description: |- - Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['']`, `metadata.annotations['']`, - spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs. - properties: - apiVersion: - description: Version of the schema the FieldPath - is written in terms of, defaults to "v1". + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: type: string - fieldPath: - description: Path of the field to select in the - specified API version. + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: type: string - required: - - fieldPath - type: object - x-kubernetes-map-type: atomic - fileKeyRef: - description: |- - FileKeyRef selects a key of the env file. - Requires the EnvFiles feature gate to be enabled. - properties: - key: - description: |- - The key within the env file. An invalid key will prevent the pod from starting. - The keys defined within a source may consist of any printable ASCII characters except '='. - During Alpha stage of the EnvFiles feature gate, the key size is limited to 128 characters. + separator: type: string - optional: - default: false - description: |- - Specify whether the file or its key must be defined. If the file or key - does not exist, then the env var is not published. - If optional is set to true and the specified key does not exist, - the environment variable will not be set in the Pod's containers. - - If optional is set to false and the specified key does not exist, - an error will be returned during Pod creation. - type: boolean - path: - description: |- - The path within the volume from which to select the file. - Must be relative and may not contain the '..' path or start with '..'. + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: type: string - volumeName: - description: The name of the volume mount containing - the env file. + targetLabel: type: string - required: - - key - - path - - volumeName type: object - x-kubernetes-map-type: atomic - resourceFieldRef: - description: |- - Selects a resource of the container: only resources limits and requests - (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported. + type: array + interval: + type: string + keep_metric_names: + type: boolean + match: + x-kubernetes-preserve-unknown-fields: true + no_align_flush_to_interval: + type: boolean + output_relabel_configs: + items: properties: - containerName: - description: 'Container name: required for volumes, - optional for env vars' + action: type: string - divisor: - anyOf: - - type: integer - - type: string - description: Specifies the output format of the - exposed resources, defaults to "1" - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - resource: - description: 'Required: resource to select' + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: type: string - required: - - resource - type: object - x-kubernetes-map-type: atomic - secretKeyRef: - description: Selects a key of a secret in the pod's - namespace - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + targetLabel: type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key type: object - x-kubernetes-map-type: atomic - type: object - required: - - name - type: object - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of - ConfigMaps or Secrets - properties: - configMapRef: - description: The ConfigMap to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: array + outputs: + items: type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: array + staleness_interval: + type: string + without: + items: type: string - optional: - description: Specify whether the Secret must be defined - type: boolean - type: object - x-kubernetes-map-type: atomic - type: object - type: array - image: - description: Image - docker image settings for VMBackuper + type: array + required: + - interval + - outputs + type: object + type: array + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: properties: - pullPolicy: - description: PullPolicy describes how to pull docker image + effect: + type: string + key: type: string - repository: - description: Repository contains name of docker image + it's - repository if needed + operator: type: string - tag: - description: Tag contains desired docker image version + tolerationSeconds: + format: int64 + type: integer + value: type: string type: object - logFormat: - description: |- - LogFormat for VMBackup to be configured with. - default or json - enum: - - default - - json - type: string - logLevel: - description: LogLevel for VMBackup to be configured with. - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - port: - description: Port for health check connections - type: string - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: + type: array + topologySpreadConstraints: + items: + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + vmBackup: + properties: + acceptEULA: + type: boolean + concurrency: + format: int32 + type: integer + credentialsSecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + customS3Endpoint: + type: string + destination: + type: string + destinationDisableSuffixAdd: + type: boolean + disableDaily: + type: boolean + disableHourly: + type: boolean + disableMonthly: + type: boolean + disableWeekly: + type: boolean + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + valueFrom: + properties: + configMapKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + fieldRef: + properties: + apiVersion: + type: string + fieldPath: + type: string + required: + - fieldPath + type: object + x-kubernetes-map-type: atomic + fileKeyRef: + properties: + key: + type: string + optional: + default: false + type: boolean + path: + type: string + volumeName: + type: string + required: + - key + - path + - volumeName + type: object + x-kubernetes-map-type: atomic + resourceFieldRef: + properties: + containerName: + type: string + divisor: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + type: string + required: + - resource + type: object + x-kubernetes-map-type: atomic + secretKeyRef: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + required: - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ type: object - type: object - restore: - description: |- - Restore Allows to enable restore options for pod - Read [more](https://docs.victoriametrics.com/victoriametrics/vmbackupmanager/#restore-commands) - properties: - onStart: - description: OnStart defines configuration for restore on - pod start + type: array + extraEnvsFrom: + items: properties: - enabled: - description: Enabled defines if restore on start enabled - type: boolean + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic type: object - type: object - snapshotCreateURL: - description: SnapshotCreateURL overwrites url for snapshot create - type: string - snapshotDeleteURL: - description: SnapShotDeleteURL overwrites url for snapshot delete - type: string - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment definition. - VolumeMounts specified will be appended to other VolumeMounts in the vmbackupmanager container, - that are generated as a result of StorageSpec objects. - items: - description: VolumeMount describes a mounting of a Volume within - a container. + type: array + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + logFormat: + enum: + - default + - json + type: string + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + port: + type: string + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + restore: properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name + onStart: + properties: + enabled: + type: boolean + type: object type: object - type: array - type: object - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. + snapshotCreateURL: type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. + snapshotDeleteURL: type: string - required: - - mountPath - - name - type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that may - be accessed by any container in the pod. - required: - - name + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array type: object - x-kubernetes-preserve-unknown-fields: true - type: array - type: object - status: - description: VMSingleStatus defines the observed state of VMSingle - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 - type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition @@ -39744,5347 +46940,2804 @@ spec: singular: vmstaticscrape scope: Namespaced versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.updateStatus - name: Status - type: string - - jsonPath: .status.reason - name: Sync Error - type: string - name: v1beta1 - schema: - openAPIV3Schema: - description: VMStaticScrape defines static targets configuration for scraping. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VMStaticScrapeSpec defines the desired state of VMStaticScrape. - properties: - jobName: - description: JobName name of job. - type: string - sampleLimit: - description: SampleLimit defines per-scrape limit on number of scraped - samples that will be accepted. - type: integer - scrapeClass: - description: ScrapeClass defined scrape class to apply - type: string - seriesLimit: - description: |- - SeriesLimit defines per-scrape limit on number of unique time series - a single target can expose during all the scrapes on the time window of 24h. - type: integer - targetEndpoints: - description: A list of target endpoints to scrape metrics from. - items: - description: TargetEndpoint defines single static target endpoint. - properties: - authorization: - description: Authorization with http header Authorization - properties: - credentials: - description: Reference to the secret with value for authorization + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.updateStatus + name: Status + type: string + - jsonPath: .status.reason + name: Sync Error + type: string + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + jobName: + type: string + sampleLimit: + type: integer + scrapeClass: + type: string + seriesLimit: + type: integer + targetEndpoints: + items: + properties: + authorization: + properties: + credentials: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + credentialsFile: + type: string + type: + type: string + type: object + basicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearerTokenFile: + type: string + bearerTokenSecret: + nullable: true + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + follow_redirects: + type: boolean + honorLabels: + type: boolean + honorTimestamps: + type: boolean + interval: + type: string + labels: + additionalProperties: + type: string + type: object + max_scrape_size: + type: string + metricRelabelConfigs: + items: + properties: + action: + type: string + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: + type: string + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: + type: string + separator: + type: string + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: + type: string + targetLabel: + type: string + type: object + type: array + oauth2: + properties: + client_id: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + client_secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + client_secret_file: + type: string + endpoint_params: + additionalProperties: + type: string + type: object + proxy_url: + type: string + scopes: + items: + type: string + type: array + tls_config: + x-kubernetes-preserve-unknown-fields: true + token_url: + minLength: 1 + type: string + required: + - client_id + - token_url + type: object + params: + additionalProperties: + items: + type: string + type: array + type: object + path: + type: string + proxyURL: + type: string + relabelConfigs: + items: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + action: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + if: + x-kubernetes-preserve-unknown-fields: true + labels: + additionalProperties: + type: string + type: object + match: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - credentialsFile: - description: File with value for authorization - type: string - type: - description: Type of authorization, default to bearer - type: string - type: object - basicAuth: - description: BasicAuth allow an endpoint to authenticate over - basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + modulus: + format: int64 + type: integer + regex: + x-kubernetes-preserve-unknown-fields: true + replacement: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + separator: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + source_labels: + items: + type: string + type: array + sourceLabels: + items: + type: string + type: array + target_label: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + targetLabel: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key type: object - x-kubernetes-map-type: atomic - type: object - bearerTokenFile: - description: File to read bearer token for scraping targets. - type: string - bearerTokenSecret: - description: |- - Secret to mount to read bearer token for scraping targets. The secret - needs to be in the same namespace as the scrape object and accessible by - the victoria-metrics operator. - nullable: true - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + type: array + sampleLimit: + type: integer + scheme: + enum: + - http + - https + - HTTPS + - HTTP + type: string + scrape_interval: + type: string + scrapeTimeout: + type: string + seriesLimit: + type: integer + targets: + items: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key + minItems: 1 + type: array + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + caFile: + type: string + cert: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + serverName: + type: string + type: object + vm_scrape_params: + properties: + disable_compression: + type: boolean + disable_keep_alive: + type: boolean + headers: + items: + type: string + type: array + no_stale_markers: + type: boolean + proxy_client_config: + properties: + basic_auth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + password_file: + type: string + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + type: object + bearer_token: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + bearer_token_file: + type: string + tls_config: + x-kubernetes-preserve-unknown-fields: true + type: object + scrape_align_interval: + type: string + scrape_offset: + type: string + stream_parse: + type: boolean + type: object + required: + - targets + type: object + type: array + required: + - targetEndpoints + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.18.0 + name: vmusers.operator.victoriametrics.com +spec: + group: operator.victoriametrics.com + names: + kind: VMUser + listKind: VMUserList + plural: vmusers + singular: vmuser + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.updateStatus + name: Status + type: string + - jsonPath: .status.reason + name: Sync Error + type: string + name: v1beta1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + bearerToken: + type: string + default_url: + items: + type: string + type: array + disable_secret_creation: + type: boolean + discover_backend_ips: + type: boolean + drop_src_path_prefix_parts: + type: integer + dump_request_on_errors: + type: boolean + generatePassword: + type: boolean + headers: + items: + type: string + type: array + ip_filters: + properties: + allow_list: + items: + type: string + type: array + deny_list: + items: + type: string + type: array + type: object + load_balancing_policy: + enum: + - least_loaded + - first_available + type: string + managedMetadata: + properties: + annotations: + additionalProperties: + type: string type: object - x-kubernetes-map-type: atomic - follow_redirects: - description: FollowRedirects controls redirects for scraping. - type: boolean - honorLabels: - description: HonorLabels chooses the metric's labels on collisions - with target labels. - type: boolean - honorTimestamps: - description: HonorTimestamps controls whether vmagent respects - the timestamps present in scraped data. - type: boolean - interval: - description: Interval at which metrics should be scraped - type: string labels: additionalProperties: type: string - description: Labels static labels for targets. type: object - max_scrape_size: - description: MaxScrapeSize defines a maximum size of scraped - data for a job + type: object + max_concurrent_requests: + type: integer + metric_labels: + additionalProperties: + type: string + type: object + name: + type: string + password: + type: string + passwordRef: + properties: + key: type: string - metricRelabelConfigs: - description: MetricRelabelConfigs to apply to samples after - scrapping. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + response_headers: + items: + type: string + type: array + retry_status_codes: + items: + type: integer + type: array + targetRefs: + items: + properties: + crd: properties: - action: - description: Action to perform based on regex matching. - Default is 'replace' - type: string - if: - description: 'If represents metricsQL match expression - (or list of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for `action: - graphite`' - type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' + kind: + enum: + - VMAgent + - VMAlert + - VMSingle + - VLogs + - VMAlertManager + - VMAlertmanager + - VMCluster/vmselect + - VMCluster/vmstorage + - VMCluster/vminsert + - VLSingle + - VLCluster/vlinsert + - VLCluster/vlselect + - VLCluster/vlstorage + - VLAgent + - VTCluster/vtinsert + - VTCluster/vtselect + - VTCluster/vtstorage + - VTSingle type: string - modulus: - description: Modulus to take of the hash of the source - label values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source - label values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. - items: - type: string - type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 + name: type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. + namespace: type: string + required: + - kind + - name + - namespace type: object - type: array - oauth2: - description: OAuth2 defines auth configuration - properties: - client_id: - description: The secret or configmap containing the OAuth2 - client id - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - client_secret: - description: The secret containing the OAuth2 client secret + discover_backend_ips: + type: boolean + drop_src_path_prefix_parts: + type: integer + headers: + items: + type: string + type: array + hosts: + items: + type: string + type: array + load_balancing_policy: + enum: + - least_loaded + - first_available + type: string + paths: + items: + type: string + type: array + query_args: + items: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean + values: + items: + type: string + type: array required: - - key - type: object - x-kubernetes-map-type: atomic - client_secret_file: - description: ClientSecretFile defines path for client secret - file. - type: string - endpoint_params: - additionalProperties: - type: string - description: Parameters to append to the token URL + - name + - values type: object - proxy_url: - description: |- - The proxy URL for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family + type: array + response_headers: + items: type: string - scopes: - description: OAuth2 scopes used for the token request - items: - type: string - type: array - tls_config: - description: |- - TLSConfig for token_url connection - ( available from v0.55.0). - Is only supported by Scrape objects family - x-kubernetes-preserve-unknown-fields: true - token_url: - description: The URL to fetch the token from - minLength: 1 + type: array + retry_status_codes: + items: + type: integer + type: array + src_headers: + items: type: string - required: - - client_id - - token_url - type: object - params: - additionalProperties: + type: array + src_query_args: items: type: string type: array - description: Optional HTTP URL parameters - type: object - path: - description: HTTP path to scrape for metrics. - type: string - proxyURL: - description: ProxyURL eg http://proxyserver:2195 Directs scrapes - to proxy through this endpoint. - type: string - relabelConfigs: - description: RelabelConfigs to apply to samples during service - discovery. - items: - description: |- - RelabelConfig allows dynamic rewriting of the label set - More info: https://docs.victoriametrics.com/victoriametrics/#relabeling + static: properties: - action: - description: Action to perform based on regex matching. - Default is 'replace' - type: string - if: - description: 'If represents metricsQL match expression - (or list of expressions): ''{__name__=~"foo_.*"}''' - x-kubernetes-preserve-unknown-fields: true - labels: - additionalProperties: - type: string - description: 'Labels is used together with Match for `action: - graphite`' - type: object - match: - description: 'Match is used together with Labels for `action: - graphite`' + url: type: string - modulus: - description: Modulus to take of the hash of the source - label values. - format: int64 - type: integer - regex: - description: |- - Regular expression against which the extracted value is matched. Default is '(.*)' - victoriaMetrics supports multiline regex joined with | - https://docs.victoriametrics.com/victoriametrics/vmagent/#relabeling-enhancements - x-kubernetes-preserve-unknown-fields: true - replacement: - description: |- - Replacement value against which a regex replace is performed if the - regular expression matches. Regex capture groups are available. Default is '$1' - type: string - separator: - description: Separator placed between concatenated source - label values. default is ';'. - type: string - source_labels: - description: |- - UnderScoreSourceLabels - additional form of source labels source_labels - for compatibility with original relabel config. - if set both sourceLabels and source_labels, sourceLabels has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - items: - type: string - type: array - sourceLabels: - description: |- - The source labels select values from existing labels. Their content is concatenated - using the configured separator and matched against the configured regular expression - for the replace, keep, and drop actions. + urls: items: type: string type: array - target_label: - description: |- - UnderScoreTargetLabel - additional form of target label - target_label - for compatibility with original relabel config. - if set both targetLabel and target_label, targetLabel has priority. - for details https://github.com/VictoriaMetrics/operator/issues/131 - type: string - targetLabel: - description: |- - Label to which the resulting value is written in a replace action. - It is mandatory for replace actions. Regex capture groups are available. - type: string type: object - type: array - sampleLimit: - description: SampleLimit defines per-scrape limit on number - of scraped samples that will be accepted. - type: integer - scheme: - description: HTTP scheme to use for scraping. - enum: - - http - - https - - HTTPS - - HTTP - type: string - scrape_interval: - description: |- - ScrapeInterval is the same as Interval and has priority over it. - one of scrape_interval or interval can be used - type: string - scrapeTimeout: - description: Timeout after which the scrape is ended - type: string - seriesLimit: - description: |- - SeriesLimit defines per-scrape limit on number of unique time series - a single target can expose during all the scrapes on the time window of 24h. - type: integer - targets: - description: Targets static targets addresses in form of ["192.122.55.55:9100","some-name:9100"]. - items: + target_path_suffix: type: string - minItems: 1 - type: array - tlsConfig: - description: TLSConfig configuration to use when scraping the - endpoint - properties: - ca: - description: Struct containing the CA cert to use for the - targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container to use - for the targets. - type: string - cert: - description: Struct containing the client cert file for - the targets. - properties: - configMap: - description: ConfigMap containing data to use for the - targets. - properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the ConfigMap or its - key must be defined - type: boolean - required: + targetRefBasicAuth: + properties: + password: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: + type: object + x-kubernetes-map-type: atomic + username: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: - key - type: object - x-kubernetes-map-type: atomic + type: object + x-kubernetes-map-type: atomic + required: + - password + - username + type: object + type: object + type: array + tlsConfig: + properties: + ca: + properties: + configMap: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key type: object - certFile: - description: Path to the client cert file in the container - for the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container - for the targets. - type: string - keySecret: - description: Secret containing the client key file for the - targets. + x-kubernetes-map-type: atomic + secret: properties: key: - description: The key of the secret to select from. Must - be a valid secret key. type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string optional: - description: Specify whether the Secret or its key must - be defined type: boolean required: - - key + - key type: object x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string type: object - vm_scrape_params: - description: VMScrapeParams defines VictoriaMetrics specific - scrape parameters + caFile: + type: string + cert: properties: - disable_compression: - description: DisableCompression - type: boolean - disable_keep_alive: - description: |- - disable_keepalive allows disabling HTTP keep-alive when scraping targets. - By default, HTTP keep-alive is enabled, so TCP connections to scrape targets - could be reused. - See https://docs.victoriametrics.com/victoriametrics/vmagent/#scrape_config-enhancements - type: boolean - headers: - description: |- - Headers allows sending custom headers to scrape targets - must be in of semicolon separated header with it's value - eg: - headerName: headerValue - vmagent supports since 1.79.0 version - items: - type: string - type: array - no_stale_markers: - type: boolean - proxy_client_config: - description: |- - ProxyClientConfig configures proxy auth settings for scraping - See feature description https://docs.victoriametrics.com/victoriametrics/vmagent/#scraping-targets-via-a-proxy + configMap: properties: - basic_auth: - description: BasicAuth allow an endpoint to authenticate - over basic authentication - properties: - password: - description: |- - Password defines reference for secret with password value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - password_file: - description: |- - PasswordFile defines path to password file at disk - must be pre-mounted - type: string - username: - description: |- - Username defines reference for secret with username value - The secret needs to be in the same namespace as scrape object - properties: - key: - description: The key of the secret to select - from. Must be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its - key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - type: object - bearer_token: - description: SecretKeySelector selects a key of a Secret. - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key - must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - bearer_token_file: + key: type: string - tls_config: - x-kubernetes-preserve-unknown-fields: true + name: + default: "" + type: string + optional: + type: boolean + required: + - key + type: object + x-kubernetes-map-type: atomic + secret: + properties: + key: + type: string + name: + default: "" + type: string + optional: + type: boolean + required: + - key type: object - scrape_align_interval: + x-kubernetes-map-type: atomic + type: object + certFile: + type: string + insecureSkipVerify: + type: boolean + keyFile: + type: string + keySecret: + properties: + key: type: string - scrape_offset: + name: + default: "" type: string - stream_parse: + optional: type: boolean + required: + - key type: object - required: - - targets - type: object - type: array - required: - - targetEndpoints - type: object - status: - description: ScrapeObjectStatus defines the observed state of ScrapeObjects - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 + x-kubernetes-map-type: atomic + serverName: type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown + type: object + tokenRef: + properties: + key: type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 + name: + default: "" type: string + optional: + type: boolean required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} + - key + type: object + x-kubernetes-map-type: atomic + username: + type: string + required: + - targetRefs + type: object + status: + properties: + conditions: + items: + properties: + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type + type: object + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: controller-gen.kubebuilder.io/version: v0.18.0 - name: vmusers.operator.victoriametrics.com + name: vtclusters.operator.victoriametrics.com spec: group: operator.victoriametrics.com names: - kind: VMUser - listKind: VMUserList - plural: vmusers - singular: vmuser + kind: VTCluster + listKind: VTClusterList + plural: vtclusters + singular: vtcluster scope: Namespaced versions: - - additionalPrinterColumns: - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - jsonPath: .status.updateStatus - name: Status - type: string - - jsonPath: .status.reason - name: Sync Error - type: string - name: v1beta1 - schema: - openAPIV3Schema: - description: VMUser is the Schema for the vmusers API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VMUserSpec defines the desired state of VMUser - properties: - bearerToken: - description: BearerToken Authorization header value for accessing - protected endpoint. - type: string - default_url: - description: |- - DefaultURLs backend url for non-matching paths filter - usually used for default backend with error message - items: + - additionalPrinterColumns: + - jsonPath: .spec.insert.replicaCount + name: Insert Count + type: string + - jsonPath: .spec.storage.replicaCount + name: Storage Count + type: string + - jsonPath: .spec.select.replicaCount + name: Select Count + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + - jsonPath: .status.updateStatus + name: Status + type: string + name: v1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + clusterDomainName: type: string - type: array - disable_secret_creation: - description: DisableSecretCreation skips related secret creation for - vmuser - type: boolean - discover_backend_ips: - description: DiscoverBackendIPs instructs discovering URLPrefix backend - IPs via DNS. - type: boolean - drop_src_path_prefix_parts: - description: |- - DropSrcPathPrefixParts is the number of `/`-delimited request path prefix parts to drop before proxying the request to backend. - See [here](https://docs.victoriametrics.com/victoriametrics/vmauth/#dropping-request-path-prefix) for more details. - type: integer - dump_request_on_errors: - description: |- - DumpRequestOnErrors instructs vmauth to return detailed request params to the client - if routing rules don't allow to forward request to the backends. - Useful for debugging `src_hosts` and `src_headers` based routing rules - - available since v1.107.0 vmauth version - type: boolean - generatePassword: - description: |- - GeneratePassword instructs operator to generate password for user - if spec.password if empty. - type: boolean - headers: - description: |- - Headers represent additional http headers, that vmauth uses - in form of ["header_key: header_value"] - multiple values for header key: - ["header_key: value1,value2"] - it's available since 1.68.0 version of vmauth - items: + clusterVersion: type: string - type: array - ip_filters: - description: |- - IPFilters defines per target src ip filters - supported only with enterprise version of [vmauth](https://docs.victoriametrics.com/victoriametrics/vmauth/#ip-filters) - properties: - allow_list: - items: - type: string - type: array - deny_list: - items: - type: string - type: array - type: object - load_balancing_policy: - description: |- - LoadBalancingPolicy defines load balancing policy to use for backend urls. - Supported policies: least_loaded, first_available. - See [here](https://docs.victoriametrics.com/victoriametrics/vmauth/#load-balancing) for more details (default "least_loaded") - enum: - - least_loaded - - first_available - type: string - managedMetadata: - description: |- - ManagedMetadata defines metadata that will be added to the all objects - created by operator for the given CustomResource - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + imagePullSecrets: + items: + properties: + name: + default: "" + type: string type: object - type: object - max_concurrent_requests: - description: |- - MaxConcurrentRequests defines max concurrent requests per user - 300 is default value for vmauth - type: integer - metric_labels: - additionalProperties: - type: string - description: MetricLabels - additional labels for metrics exported - by vmauth for given user. - type: object - name: - description: Name of the VMUser object. - type: string - password: - description: Password basic auth password for accessing protected - endpoint. - type: string - passwordRef: - description: PasswordRef allows fetching password from user-create - secret by its name and key. - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - response_headers: - description: |- - ResponseHeaders represent additional http headers, that vmauth adds for request response - in form of ["header_key: header_value"] - multiple values for header key: - ["header_key: value1,value2"] - it's available since 1.93.0 version of vmauth - items: - type: string - type: array - retry_status_codes: - description: |- - RetryStatusCodes defines http status codes in numeric format for request retries - e.g. [429,503] - items: - type: integer - type: array - targetRefs: - description: TargetRefs - reference to endpoints, which user may access. - items: - description: |- - TargetRef describes target for user traffic forwarding. - one of target types can be chosen: - crd or static per targetRef. - user can define multiple targetRefs with different ref Types. + x-kubernetes-map-type: atomic + type: array + insert: properties: - crd: - description: |- - CRD describes exist operator's CRD object, - operator generates access url based on CRD params. - properties: - kind: - description: |- - Kind one of: - VMAgent,VMAlert, VMSingle, VMCluster/vmselect, VMCluster/vmstorage,VMCluster/vminsert,VMAlertManager, VLSingle, VLCluster/vlinsert, VLCluster/vlselect, VLCluster/vlstorage, VTSingle, VTCluster/vtinsert, VTCluster/vtselect, VTCluster/vtstorage and VLAgent - enum: - - VMAgent - - VMAlert - - VMSingle - - VLogs - - VMAlertManager - - VMAlertmanager - - VMCluster/vmselect - - VMCluster/vmstorage - - VMCluster/vminsert - - VLSingle - - VLCluster/vlinsert - - VLCluster/vlselect - - VLCluster/vlstorage - - VLAgent - - VTCluster/vtinsert - - VTCluster/vtselect - - VTCluster/vtstorage - - VTSingle - type: string - name: - description: Name target CRD object name - type: string - namespace: - description: Namespace target CRD object namespace. - type: string - required: - - kind - - name - - namespace + affinity: type: object - discover_backend_ips: - description: DiscoverBackendIPs instructs discovering URLPrefix - backend IPs via DNS. - type: boolean - drop_src_path_prefix_parts: - description: |- - DropSrcPathPrefixParts is the number of `/`-delimited request path prefix parts to drop before proxying the request to backend. - See [here](https://docs.victoriametrics.com/victoriametrics/vmauth/#dropping-request-path-prefix) for more details. - type: integer - headers: - description: |- - RequestHeaders represent additional http headers, that vmauth uses - in form of ["header_key: header_value"] - multiple values for header key: - ["header_key: value1,value2"] - it's available since 1.68.0 version of vmauth - items: - type: string - type: array - hosts: - items: - type: string - type: array - load_balancing_policy: - description: |- - LoadBalancingPolicy defines load balancing policy to use for backend urls. - Supported policies: least_loaded, first_available. - See [here](https://docs.victoriametrics.com/victoriametrics/vmauth/#load-balancing) for more details (default "least_loaded") - enum: - - least_loaded - - first_available - type: string - paths: - description: Paths - matched path to route. + x-kubernetes-preserve-unknown-fields: true + configMaps: items: type: string type: array - query_args: - description: QueryArgs appends list of query arguments to generated - URL + containers: items: - description: QueryArg defines item for query arguments - properties: - name: - description: Name of query argument - type: string - values: - description: Values of query argument - items: - type: string - type: array required: - - name - - values + - name type: object + x-kubernetes-preserve-unknown-fields: true type: array - response_headers: - description: |- - ResponseHeaders represent additional http headers, that vmauth adds for request response - in form of ["header_key: header_value"] - multiple values for header key: - ["header_key: value1,value2"] - it's available since 1.93.0 version of vmauth - items: - type: string - type: array - retry_status_codes: - description: |- - RetryStatusCodes defines http status codes in numeric format for request retries - Can be defined per target or at VMUser.spec level - e.g. [429,503] - items: - type: integer - type: array - src_headers: - description: SrcHeaders is an optional list of headers, which - must match request headers. - items: - type: string - type: array - src_query_args: - description: SrcQueryArgs is an optional list of query args, - which must match request URL query args. - items: - type: string - type: array - static: - description: |- - Static - user defined url for traffic forward, - for instance http://vmsingle:8428 + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true properties: - url: - description: URL http url for given staticRef. - type: string - urls: - description: URLs allows setting multiple urls for load-balancing - at vmauth-side. + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: items: type: string type: array + x-kubernetes-list-type: atomic type: object - target_path_suffix: - description: |- - TargetPathSuffix allows to add some suffix to the target path - It allows to hide tenant configuration from user with crd as ref. - it also may contain any url encoded params. + dnsPolicy: type: string - targetRefBasicAuth: - description: TargetRefBasicAuth allow an target endpoint to - authenticate over basic authentication - properties: - password: - description: |- - The secret in the service scrape namespace that contains the password - for authentication. - It must be at them same namespace as CRD - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - username: - description: |- - The secret in the service scrape namespace that contains the username - for authentication. - It must be at them same namespace as CRD - properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - required: - - password - - username + extraArgs: + additionalProperties: + type: string type: object - type: object - type: array - tlsConfig: - description: TLSConfig defines tls configuration for the backend connection - properties: - ca: - description: Struct containing the CA cert to use for the targets. - properties: - configMap: - description: ConfigMap containing data to use for the targets. + extraEnvs: + items: properties: - key: - description: The key to select. - type: string name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean + value: + type: string required: - - key + - name type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. + x-kubernetes-preserve-unknown-fields: true + type: array + extraEnvsFrom: + items: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + prefix: type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean + type: object + x-kubernetes-map-type: atomic + type: object + type: array + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean required: - - key + - ip type: object - x-kubernetes-map-type: atomic - type: object - caFile: - description: Path to the CA cert in the container to use for the - targets. - type: string - cert: - description: Struct containing the client cert file for the targets. - properties: - configMap: - description: ConfigMap containing data to use for the targets. + type: array + hostAliases: + items: properties: - key: - description: The key to select. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: type: string - optional: - description: Specify whether the ConfigMap or its key - must be defined - type: boolean required: - - key + - ip type: object - x-kubernetes-map-type: atomic - secret: - description: Secret containing data to use for the targets. + type: array + hostNetwork: + type: boolean + hpa: + type: object + x-kubernetes-preserve-unknown-fields: true + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + imagePullSecrets: + items: properties: - key: - description: The key of the secret to select from. Must - be a valid secret key. - type: string name: default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the Secret or its key must - be defined - type: boolean - required: - - key type: object x-kubernetes-map-type: atomic - type: object - certFile: - description: Path to the client cert file in the container for - the targets. - type: string - insecureSkipVerify: - description: Disable target certificate validation. - type: boolean - keyFile: - description: Path to the client key file in the container for - the targets. - type: string - keySecret: - description: Secret containing the client key file for the targets. - properties: - key: - description: The key of the secret to select from. Must be - a valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be - defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - serverName: - description: Used to verify the hostname for the targets. - type: string - type: object - tokenRef: - description: TokenRef allows fetching token from user-created secrets - by its name and key. - properties: - key: - description: The key of the secret to select from. Must be a - valid secret key. - type: string - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret or its key must be defined - type: boolean - required: - - key - type: object - x-kubernetes-map-type: atomic - username: - description: |- - Username basic auth user name for accessing protected endpoint, - will be replaced with metadata.name of VMUser if omitted. - type: string - required: - - targetRefs - type: object - status: - description: VMUserStatus defines the observed state of VMUser - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 + type: array + initContainers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + livenessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + logFormat: + enum: + - default + - json type: string - status: - description: status of the condition, one of True, False, Unknown. + logLevel: enum: - - "True" - - "False" - - Unknown + - INFO + - WARN + - ERROR + - FATAL + - PANIC type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + podDisruptionBudget: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow + type: string + type: object + podMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string + type: object + port: type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.18.0 - name: vtclusters.operator.victoriametrics.com -spec: - group: operator.victoriametrics.com - names: - kind: VTCluster - listKind: VTClusterList - plural: vtclusters - singular: vtcluster - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: replicas of VTInsert - jsonPath: .spec.insert.replicaCount - name: Insert Count - type: string - - description: replicas of VTStorage - jsonPath: .spec.storage.replicaCount - name: Storage Count - type: string - - description: replicas of VTSelect - jsonPath: .spec.select.replicaCount - name: Select Count - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - - description: Current status of cluster - jsonPath: .status.updateStatus - name: Status - type: string - name: v1 - schema: - openAPIV3Schema: - description: VTCluster is fast, cost-effective and scalable traces database. - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VTClusterSpec defines the desired state of VTCluster - properties: - clusterDomainName: - description: |- - ClusterDomainName defines domain name suffix for in-cluster dns addresses - aka .cluster.local - used by vtinsert and vtselect to build vtstorage address - type: string - clusterVersion: - description: |- - ClusterVersion defines default images tag for all components. - it can be overwritten with component specific image.tag value. - type: string - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + readinessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdate: + properties: + maxSurge: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + runtimeClassName: type: string - type: object - x-kubernetes-map-type: atomic - type: array - insert: - description: VTInsert defines vtinsert component configuration at - victoria-traces cluster - properties: - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: + schedulerName: type: string - type: array - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to - run within a pod. - required: - - name + secrets: + items: + type: string + type: array + securityContext: type: object x-kubernetes-preserve-unknown-fields: true - type: array - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: - x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. - properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this DNS resolver option's value. - type: string - type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application - container - items: - description: EnvVar represents an environment variable present - in a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string + serviceScrapeSpec: required: - - name + - endpoints type: object x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of - ConfigMaps or Secrets + serviceSpec: properties: - configMapRef: - description: The ConfigMap to select from + metadata: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean + spec: type: object - x-kubernetes-map-type: atomic + x-kubernetes-preserve-unknown-fields: true + useAsDefault: + type: boolean + required: + - spec type: object - type: array - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. + startupProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + updateStrategy: + enum: + - Recreate + - RollingUpdate + type: string + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + managedMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + type: object + paused: + type: boolean + requestsLoadBalancer: + properties: + disableInsertBalancing: + type: boolean + disableSelectBalancing: + type: boolean + enabled: + type: boolean + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + select: + properties: + affinity: + type: object + x-kubernetes-preserve-unknown-fields: true + configMaps: + items: + type: string + type: array + containers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true properties: - hostnames: - description: Hostnames for the above IP address. + nameservers: items: type: string type: array x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: items: type: string type: array x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the - node network namespace - type: boolean - hpa: - description: Configures horizontal pod autoscaling. - type: object - x-kubernetes-preserve-unknown-fields: true - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image + it's - repository if needed - type: string - tag: - description: Tag contains desired docker image version - type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - type: array - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to - run within a pod. - required: - - name type: object - x-kubernetes-preserve-unknown-fields: true - type: array - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logFormat: - description: |- - LogFormat for VTInsert to be configured with. - default or json - enum: - - default - - json - type: string - logLevel: - description: LogLevel for VTInsert to be configured with. - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - nodeSelector: - additionalProperties: + dnsPolicy: type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - podDisruptionBudget: - description: PodDisruptionBudget created by operator - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at most "maxUnavailable" pods selected by - "selector" are unavailable after the eviction, i.e. even in absence of - the evicted pod. For example, one can prevent all voluntary evictions - by specifying 0. This is a mutually exclusive setting with "minAvailable". - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at least "minAvailable" pods selected by - "selector" will still be available after the eviction, i.e. even in the - absence of the evicted pod. So for example you can prevent all voluntary - evictions by specifying "100%". - x-kubernetes-int-or-string: true - selectorLabels: - additionalProperties: - type: string - description: |- - replaces default labels selector generated by operator - it's useful when you need to create custom budget - type: object - unhealthyPodEvictionPolicy: - description: |- - UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods - - Valid policies are IfHealthyBudget and AlwaysAllow. - If no policy is specified, the default behavior will be used, - which corresponds to the IfHealthyBudget policy. - Available from operator v0.64.0 - enum: - - IfHealthyBudget - - AlwaysAllow - type: string - type: object - podMetadata: - description: PodMetadata configures Labels and Annotations which - are propagated to the VTInsert pods. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names + extraArgs: + additionalProperties: type: string - type: object - port: - description: Port listen address - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods - type: string - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod - condition - properties: - conditionType: - description: ConditionType refers to a condition in the - pod's condition list with matching type. - type: string - required: - - conditionType - type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: + type: object + extraEnvs: + items: + properties: + name: + type: string + value: + type: string + required: - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ type: object - type: object - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - rollingUpdate: - description: RollingUpdate - overrides deployment update params. - properties: - maxSurge: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of pods that can be scheduled above the desired number of - pods. - Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - This can not be 0 if MaxUnavailable is 0. - Absolute number is calculated from percentage by rounding up. - Defaults to 25%. - Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when - the rolling update starts, such that the total number of old and new pods do not exceed - 130% of desired pods. Once old pods have been killed, - new ReplicaSet can be scaled up further, ensuring that total number of pods running - at any time during the update is at most 130% of desired pods. - x-kubernetes-int-or-string: true - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of pods that can be unavailable during the update. - Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - Absolute number is calculated from percentage by rounding down. - This can not be 0 if MaxSurge is 0. - Defaults to 25%. - Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods - immediately when the rolling update starts. Once new pods are ready, old ReplicaSet - can be scaled down further, followed by scaling up the new ReplicaSet, ensuring - that the total number of pods available at all times during the update is at - least 70% of desired pods. - x-kubernetes-int-or-string: true - type: object - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: - type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vtinsert - VMServiceScrape spec - required: - - endpoints - type: object - x-kubernetes-preserve-unknown-fields: true - serviceSpec: - description: ServiceSpec that will be added to vtinsert service - spec - properties: - metadata: - description: EmbeddedObjectMetadata defines objectMeta for - additional service. + x-kubernetes-preserve-unknown-fields: true + type: array + extraEnvsFrom: + items: properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names + x-kubernetes-map-type: atomic + type: object + type: array + extraStorageNodes: + items: + properties: + addr: type: string + required: + - addr type: object - spec: - description: |- - ServiceSpec describes the attributes that a user creates on a service. - More info: https://kubernetes.io/docs/concepts/services-networking/service/ + type: array + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip type: object - x-kubernetes-preserve-unknown-fields: true - useAsDefault: - description: |- - UseAsDefault applies changes from given service definition to the main object Service - Changing from headless service to clusterIP or loadbalancer may break cross-component communication - type: boolean - required: - - spec - type: object - startupProbe: - description: StartupProbe that will be added to CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container - graceful termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread - matching pods among the given topology. - required: - - maxSkew - - topologyKey - - whenUnsatisfiable + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip + type: object + type: array + hostNetwork: + type: boolean + hpa: type: object x-kubernetes-preserve-unknown-fields: true - type: array - updateStrategy: - description: UpdateStrategy - overrides default update strategy. - enum: - - Recreate - - RollingUpdate - type: string - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. + image: properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). + pullPolicy: type: string - name: - description: This must match the Name of a Volume. + repository: type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. + tag: type: string - required: - - mountPath - - name type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that - may be accessed by any container in the pod. - required: - - name + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + livenessProbe: type: object x-kubernetes-preserve-unknown-fields: true - type: array - type: object - managedMetadata: - description: |- - ManagedMetadata defines metadata that will be added to the all objects - created by operator for the given CustomResource - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: + logFormat: + enum: + - default + - json type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - requestsLoadBalancer: - description: |- - RequestsLoadBalancer configures load-balancing for vtinsert and vtselect requests. - It helps to evenly spread load across pods. - Usually it's not possible with Kubernetes TCP-based services. - properties: - disableInsertBalancing: - type: boolean - disableSelectBalancing: - type: boolean - enabled: - type: boolean - spec: - description: |- - VMAuthLoadBalancerSpec defines configuration spec for VMAuth used as load-balancer - for VMCluster component - type: object - x-kubernetes-preserve-unknown-fields: true - type: object - select: - description: VTSelect defines vtselect component configuration at - victoria-traces cluster - properties: - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC type: string - type: array - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to - run within a pod. - required: - - name + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: + type: string type: object - x-kubernetes-preserve-unknown-fields: true - type: array - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: - x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: + paused: + type: boolean + podDisruptionBudget: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. - properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this DNS resolver option's value. - type: string + type: object + podMetadata: + properties: + annotations: + additionalProperties: + type: string type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: + labels: + additionalProperties: + type: string + type: object + name: type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - extraArgs: - additionalProperties: + type: object + port: type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application - container - items: - description: EnvVar represents an environment variable present - in a Container. + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + readinessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdate: properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string + maxSurge: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + runtimeClassName: + type: string + schedulerName: + type: string + secrets: + items: + type: string + type: array + securityContext: + type: object + x-kubernetes-preserve-unknown-fields: true + serviceScrapeSpec: required: - - name + - endpoints type: object x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of - ConfigMaps or Secrets + serviceSpec: properties: - configMapRef: - description: The ConfigMap to select from + metadata: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - optional: - description: Specify whether the Secret must be defined - type: boolean + spec: type: object - x-kubernetes-map-type: atomic - type: object - type: array - extraStorageNodes: - description: ExtraStorageNodes - defines additional storage nodes - to VTSelect - items: - description: VTStorageNode defines slice of additional vtstorage - nodes - properties: - addr: - description: Addr defines storage node address - type: string - required: - - addr - type: object - type: array - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string + x-kubernetes-preserve-unknown-fields: true + useAsDefault: + type: boolean required: - - ip - type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the - node network namespace - type: boolean - hpa: - description: Configures horizontal pod autoscaling. - type: object - x-kubernetes-preserve-unknown-fields: true - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image + it's - repository if needed - type: string - tag: - description: Tag contains desired docker image version - type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string + - spec type: object - x-kubernetes-map-type: atomic - type: array - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to - run within a pod. - required: - - name + startupProbe: type: object x-kubernetes-preserve-unknown-fields: true - type: array - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logFormat: - description: |- - LogFormat for VTSelect to be configured with. - default or json - enum: - - default - - json - type: string - logLevel: - description: LogLevel for VTSelect to be configured with. - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - nodeSelector: - additionalProperties: + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: + type: string + key: + type: string + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + updateStrategy: + enum: + - Recreate + - RollingUpdate type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - podDisruptionBudget: - description: PodDisruptionBudget created by operator - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at most "maxUnavailable" pods selected by - "selector" are unavailable after the eviction, i.e. even in absence of - the evicted pod. For example, one can prevent all voluntary evictions - by specifying 0. This is a mutually exclusive setting with "minAvailable". - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at least "minAvailable" pods selected by - "selector" will still be available after the eviction, i.e. even in the - absence of the evicted pod. So for example you can prevent all voluntary - evictions by specifying "100%". - x-kubernetes-int-or-string: true - selectorLabels: - additionalProperties: - type: string - description: |- - replaces default labels selector generated by operator - it's useful when you need to create custom budget - type: object - unhealthyPodEvictionPolicy: - description: |- - UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods - - Valid policies are IfHealthyBudget and AlwaysAllow. - If no policy is specified, the default behavior will be used, - which corresponds to the IfHealthyBudget policy. - Available from operator v0.64.0 - enum: - - IfHealthyBudget - - AlwaysAllow - type: string - type: object - podMetadata: - description: PodMetadata configures Labels and Annotations which - are propagated to the VTSelect pods. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + type: array + volumes: + items: + required: + - name type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - port: - description: Port listen address - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods - type: string - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod - condition - properties: - conditionType: - description: ConditionType refers to a condition in the - pod's condition list with matching type. - type: string - required: - - conditionType + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + serviceAccountName: + type: string + storage: + properties: + affinity: type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + x-kubernetes-preserve-unknown-fields: true + claimTemplates: + items: type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + x-kubernetes-preserve-unknown-fields: true + type: array + configMaps: + items: + type: string + type: array + containers: + items: + required: + - name type: object - type: object - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - rollingUpdate: - description: RollingUpdate - overrides deployment update params. - properties: - maxSurge: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of pods that can be scheduled above the desired number of - pods. - Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - This can not be 0 if MaxUnavailable is 0. - Absolute number is calculated from percentage by rounding up. - Defaults to 25%. - Example: when this is set to 30%, the new ReplicaSet can be scaled up immediately when - the rolling update starts, such that the total number of old and new pods do not exceed - 130% of desired pods. Once old pods have been killed, - new ReplicaSet can be scaled up further, ensuring that total number of pods running - at any time during the update is at most 130% of desired pods. - x-kubernetes-int-or-string: true - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - The maximum number of pods that can be unavailable during the update. - Value can be an absolute number (ex: 5) or a percentage of desired pods (ex: 10%). - Absolute number is calculated from percentage by rounding down. - This can not be 0 if MaxSurge is 0. - Defaults to 25%. - Example: when this is set to 30%, the old ReplicaSet can be scaled down to 70% of desired pods - immediately when the rolling update starts. Once new pods are ready, old ReplicaSet - can be scaled down further, followed by scaling up the new ReplicaSet, ensuring - that the total number of pods available at all times during the update is at - least 70% of desired pods. - x-kubernetes-int-or-string: true - type: object - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: + x-kubernetes-preserve-unknown-fields: true + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string + type: object + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vtselect - VMServiceScrape spec - required: - - endpoints - type: object - x-kubernetes-preserve-unknown-fields: true - serviceSpec: - description: ServiceSpec that will be added to vtselect service - spec - properties: - metadata: - description: EmbeddedObjectMetadata defines objectMeta for - additional service. + extraArgs: + additionalProperties: + type: string + type: object + extraEnvs: + items: properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations + name: + type: string + value: + type: string + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + extraEnvsFrom: + items: + properties: + configMapRef: + properties: + name: + default: "" + type: string + optional: + type: boolean type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names + x-kubernetes-map-type: atomic + type: object + type: array + futureRetention: + pattern: ^[0-9]+(h|d|w|y)?$ + type: string + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: type: string + required: + - ip type: object - spec: - description: |- - ServiceSpec describes the attributes that a user creates on a service. - More info: https://kubernetes.io/docs/concepts/services-networking/service/ + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip type: object - x-kubernetes-preserve-unknown-fields: true - useAsDefault: - description: |- - UseAsDefault applies changes from given service definition to the main object Service - Changing from headless service to clusterIP or loadbalancer may break cross-component communication - type: boolean - required: - - spec - type: object - startupProbe: - description: StartupProbe that will be added to CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container - graceful termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . + type: array + hostNetwork: + type: boolean + image: properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. + pullPolicy: type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. + repository: + type: string + tag: type: string type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread - matching pods among the given topology. - required: - - maxSkew - - topologyKey - - whenUnsatisfiable + imagePullSecrets: + items: + properties: + name: + default: "" + type: string + type: object + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + livenessProbe: type: object x-kubernetes-preserve-unknown-fields: true - type: array - updateStrategy: - description: UpdateStrategy - overrides default update strategy. - enum: - - Recreate - - RollingUpdate - type: string - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. + logFormat: + enum: + - default + - json + type: string + logIngestedRows: + type: boolean + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + logNewStreams: + type: boolean + maintenanceInsertNodeIDs: + items: + format: int32 + type: integer + type: array + maintenanceSelectNodeIDs: + items: + format: int32 + type: integer + type: array + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + persistentVolumeClaimRetentionPolicy: properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. + whenDeleted: type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. + whenScaled: type: string - required: - - mountPath - - name type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that - may be accessed by any container in the pod. - required: - - name + podDisruptionBudget: + properties: + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + minAvailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + selectorLabels: + additionalProperties: + type: string + type: object + unhealthyPodEvictionPolicy: + enum: + - IfHealthyBudget + - AlwaysAllow + type: string type: object - x-kubernetes-preserve-unknown-fields: true - type: array - type: object - serviceAccountName: - description: |- - ServiceAccountName is the name of the ServiceAccount to use to run the - VTSelect, VTInsert and VTStorage Pods. - type: string - storage: - description: VTStorage defines vtstorage component configuration at - victoria-traces cluster - properties: - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - claimTemplates: - description: ClaimTemplates allows adding additional VolumeClaimTemplates - for StatefulSet - items: - description: PersistentVolumeClaim is a user's request for and - claim to a persistent volume + podMetadata: + properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: + type: string type: object - x-kubernetes-preserve-unknown-fields: true - type: array - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: + port: type: string - type: array - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to - run within a pod. - required: - - name + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + readinessProbe: type: object x-kubernetes-preserve-unknown-fields: true - type: array - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: - x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. - properties: - name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this DNS resolver option's value. - type: string + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - extraArgs: - additionalProperties: + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + retentionMaxDiskSpaceUsageBytes: type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application - container - items: - description: EnvVar represents an environment variable present - in a Container. + retentionPeriod: + pattern: ^[0-9]+(h|d|w|y)?$ + type: string + revisionHistoryLimitCount: + format: int32 + type: integer + rollingUpdateStrategy: + type: string + rollingUpdateStrategyBehavior: properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string + maxUnavailable: + anyOf: + - type: integer + - type: string + x-kubernetes-int-or-string: true + type: object + runtimeClassName: + type: string + schedulerName: + type: string + secrets: + items: + type: string + type: array + securityContext: + type: object + x-kubernetes-preserve-unknown-fields: true + serviceScrapeSpec: required: - - name + - endpoints type: object x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of - ConfigMaps or Secrets + serviceSpec: properties: - configMapRef: - description: The ConfigMap to select from + metadata: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean type: object - x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + useAsDefault: + type: boolean + required: + - spec + type: object + startupProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + storage: + properties: + disableMountSubPath: + type: boolean + emptyDir: properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + medium: type: string - optional: - description: Specify whether the Secret must be defined - type: boolean + sizeLimit: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true type: object - x-kubernetes-map-type: atomic + volumeClaimTemplate: + type: object + x-kubernetes-preserve-unknown-fields: true type: object - type: array - futureRetention: - description: |- - FutureRetention for the stored traces - Log entries with timestamps bigger than now+futureRetention are rejected during data ingestion - see https://docs.victoriametrics.com/victoriatraces/#configure-and-run-victoriatraces - pattern: ^[0-9]+(h|d|w|y)?$ - type: string - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: + storageDataPath: + type: string + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: + properties: + effect: type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: + key: type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. - type: string - required: - - ip - type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the - node network namespace - type: boolean - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: + type: string + type: object + type: array + topologySpreadConstraints: + items: + required: + - maxSkew + - topologyKey + - whenUnsatisfiable + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + volumeMounts: + items: + properties: + mountPath: + type: string + mountPropagation: + type: string + name: + type: string + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: + type: string + required: + - mountPath + - name + type: object + type: array + volumes: + items: + required: + - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + useStrictSecurity: + type: boolean + type: object + status: + properties: + conditions: + items: properties: - pullPolicy: - description: PullPolicy describes how to pull docker image + lastTransitionTime: + format: date-time type: string - repository: - description: Repository contains name of docker image + it's - repository if needed + lastUpdateTime: + format: date-time type: string - tag: - description: Tag contains desired docker image version + message: + maxLength: 32768 type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names - type: string - type: object - x-kubernetes-map-type: atomic - type: array - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to - run within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logFormat: - description: |- - LogFormat for VTStorage to be configured with. - default or json - enum: - - default - - json - type: string - logIngestedRows: - description: |- - Whether to log all the ingested log entries; this can be useful for debugging of data ingestion - see https://docs.victoriametrics.com/victoriatraces/#configure-and-run-victoriatraces - type: boolean - logLevel: - description: LogLevel for VTStorage to be configured with. - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - logNewStreams: - description: |- - LogNewStreams Whether to log creation of new streams; this can be useful for debugging of high cardinality issues with log streams - see https://docs.victoriametrics.com/victoriatraces/#configure-and-run-victoriatraces - type: boolean - maintenanceInsertNodeIDs: - description: |- - MaintenanceInsertNodeIDs - excludes given node ids from insert requests routing, must contain pod suffixes - for pod-0, id will be 0 and etc. - lets say, you have pod-0, pod-1, pod-2, pod-3. to exclude pod-0 and pod-3 from insert routing, define nodeIDs: [0,3]. - Useful at storage expanding, when you want to rebalance some data at cluster. - items: - format: int32 - type: integer - type: array - maintenanceSelectNodeIDs: - description: MaintenanceInsertNodeIDs - excludes given node ids - from select requests routing, must contain pod suffixes - for - pod-0, id will be 0 and etc. - items: - format: int32 - type: integer - type: array - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - nodeSelector: - additionalProperties: - type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - persistentVolumeClaimRetentionPolicy: - description: PersistentVolumeClaimRetentionPolicy allows configuration - of PVC retention policy - properties: - whenDeleted: - description: |- - WhenDeleted specifies what happens to PVCs created from StatefulSet - VolumeClaimTemplates when the StatefulSet is deleted. The default policy - of `Retain` causes PVCs to not be affected by StatefulSet deletion. The - `Delete` policy causes those PVCs to be deleted. - type: string - whenScaled: - description: |- - WhenScaled specifies what happens to PVCs created from StatefulSet - VolumeClaimTemplates when the StatefulSet is scaled down. The default - policy of `Retain` causes PVCs to not be affected by a scaledown. The - `Delete` policy causes the associated PVCs for any excess pods above - the replica count to be deleted. + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 type: string - type: object - podDisruptionBudget: - description: PodDisruptionBudget created by operator - properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at most "maxUnavailable" pods selected by - "selector" are unavailable after the eviction, i.e. even in absence of - the evicted pod. For example, one can prevent all voluntary evictions - by specifying 0. This is a mutually exclusive setting with "minAvailable". - x-kubernetes-int-or-string: true - minAvailable: - anyOf: - - type: integer - - type: string - description: |- - An eviction is allowed if at least "minAvailable" pods selected by - "selector" will still be available after the eviction, i.e. even in the - absence of the evicted pod. So for example you can prevent all voluntary - evictions by specifying "100%". - x-kubernetes-int-or-string: true - selectorLabels: - additionalProperties: - type: string - description: |- - replaces default labels selector generated by operator - it's useful when you need to create custom budget - type: object - unhealthyPodEvictionPolicy: - description: |- - UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods - - Valid policies are IfHealthyBudget and AlwaysAllow. - If no policy is specified, the default behavior will be used, - which corresponds to the IfHealthyBudget policy. - Available from operator v0.64.0 + status: enum: - - IfHealthyBudget - - AlwaysAllow + - "True" + - "False" + - Unknown type: string - type: object - podMetadata: - description: PodMetadata configures Labels and Annotations which - are propagated to the VTStorage pods. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names + type: + maxLength: 316 type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type type: object - port: - description: Port listen address - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.18.0 + name: vtsingles.operator.victoriametrics.com +spec: + group: operator.victoriametrics.com + names: + kind: VTSingle + listKind: VTSingleList + plural: vtsingles + singular: vtsingle + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.status + name: Status + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + properties: + affinity: + type: object + x-kubernetes-preserve-unknown-fields: true + configMaps: + items: type: string - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod - condition - properties: - conditionType: - description: ConditionType refers to a condition in the - pod's condition list with matching type. - type: string - required: - - conditionType - type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod + type: array + containers: + items: + required: + - name type: object x-kubernetes-preserve-unknown-fields: true - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name - type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ + type: array + disableAutomountServiceAccountToken: + type: boolean + disableSelfServiceScrape: + type: boolean + dnsConfig: + items: + x-kubernetes-preserve-unknown-fields: true + properties: + nameservers: + items: + type: string + type: array + x-kubernetes-list-type: atomic + options: + items: + properties: + name: + type: string + value: + type: string type: object - type: object - retentionMaxDiskSpaceUsageBytes: - description: |- - RetentionMaxDiskSpaceUsageBytes for the stored traces - VictoriaTraces keeps at least two last days of data in order to guarantee that the traces for the last day can be returned in queries. - This means that the total disk space usage may exceed the -retention.maxDiskSpaceUsageBytes, - if the size of the last two days of data exceeds the -retention.maxDiskSpaceUsageBytes. - https://docs.victoriametrics.com/victoriatraces/#configure-and-run-victoriatraces - type: string - retentionPeriod: - description: |- - RetentionPeriod for the stored traces - https://docs.victoriametrics.com/victoriatraces/#configure-and-run-victoriatraces - pattern: ^[0-9]+(h|d|w|y)?$ - type: string - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - rollingUpdateStrategy: - description: |- - RollingUpdateStrategy defines strategy for application updates - Default is OnDelete, in this case operator handles update process - Can be changed for RollingUpdate + type: array + x-kubernetes-list-type: atomic + searches: + items: + type: string + type: array + x-kubernetes-list-type: atomic + type: object + dnsPolicy: + type: string + extraArgs: + additionalProperties: type: string - rollingUpdateStrategyBehavior: - description: |- - RollingUpdateStrategyBehavior defines customized behavior for rolling updates. - It applies if the RollingUpdateStrategy is set to OnDelete, which is the default. + type: object + extraEnvs: + items: properties: - maxUnavailable: - anyOf: - - type: integer - - type: string - description: |- - MaxUnavailable defines the maximum number of pods that can be unavailable during the update. - It can be specified as an absolute number (e.g. 2) or a percentage of the total pods (e.g. "50%"). - For example, if set to 100%, all pods will be upgraded at once, minimizing downtime when needed. - x-kubernetes-int-or-string: true - type: object - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: - type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vtstorage - VMServiceScrape spec + name: + type: string + value: + type: string required: - - endpoints + - name type: object x-kubernetes-preserve-unknown-fields: true - serviceSpec: - description: ServiceSpec that will be added to vtstorage service - spec + type: array + extraEnvsFrom: + items: properties: - metadata: - description: EmbeddedObjectMetadata defines objectMeta for - additional service. + configMapRef: properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names + default: "" type: string + optional: + type: boolean type: object - spec: - description: |- - ServiceSpec describes the attributes that a user creates on a service. - More info: https://kubernetes.io/docs/concepts/services-networking/service/ + x-kubernetes-map-type: atomic + prefix: + type: string + secretRef: + properties: + name: + default: "" + type: string + optional: + type: boolean type: object - x-kubernetes-preserve-unknown-fields: true - useAsDefault: - description: |- - UseAsDefault applies changes from given service definition to the main object Service - Changing from headless service to clusterIP or loadbalancer may break cross-component communication - type: boolean + x-kubernetes-map-type: atomic + type: object + type: array + futureRetention: + pattern: ^[0-9]+(h|d|y)?$ + type: string + host_aliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string required: - - spec + - ip type: object - startupProbe: - description: StartupProbe that will be added to CRD pod + type: array + hostAliases: + items: + properties: + hostnames: + items: + type: string + type: array + x-kubernetes-list-type: atomic + ip: + type: string + required: + - ip type: object - x-kubernetes-preserve-unknown-fields: true - storage: - description: Storage configures persistent volume for VTStorage + type: array + hostNetwork: + type: boolean + image: + properties: + pullPolicy: + type: string + repository: + type: string + tag: + type: string + type: object + imagePullSecrets: + items: properties: - disableMountSubPath: - description: |- - Deprecated: subPath usage will be disabled by default in a future release, this option will become unnecessary. - DisableMountSubPath allows to remove any subPath usage in volume mounts. - type: boolean - emptyDir: - description: |- - EmptyDirVolumeSource to be used by the Prometheus StatefulSets. If specified, used in place of any volumeClaimTemplate. More - info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir - properties: - medium: - description: |- - medium represents what type of storage medium should back this directory. - The default is "" which means to use the node's default medium. - Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - type: string - sizeLimit: - anyOf: - - type: integer - - type: string - description: |- - sizeLimit is the total amount of local storage required for this EmptyDir volume. - The size limit is also applicable for memory medium. - The maximum usage on memory medium EmptyDir would be the minimum value between - the SizeLimit specified here and the sum of memory limits of all containers in a pod. - The default is nil which means that the limit is undefined. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - type: object - volumeClaimTemplate: - description: A PVC spec to be used by the StatefulSets/Deployments. - type: object - x-kubernetes-preserve-unknown-fields: true + name: + default: "" + type: string type: object - storageDataPath: - description: StorageDataPath - path to storage data - type: string - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container - graceful termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread - matching pods among the given topology. - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath + x-kubernetes-map-type: atomic + type: array + initContainers: + items: + required: - name + type: object + x-kubernetes-preserve-unknown-fields: true + type: array + livenessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + logFormat: + enum: + - default + - json + type: string + logIngestedRows: + type: boolean + logLevel: + enum: + - INFO + - WARN + - ERROR + - FATAL + - PANIC + type: string + logNewStreams: + type: boolean + managedMetadata: + properties: + annotations: + additionalProperties: + type: string type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that - may be accessed by any container in the pod. - required: - - name + labels: + additionalProperties: + type: string type: object - x-kubernetes-preserve-unknown-fields: true - type: array - type: object - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - type: object - status: - description: VTClusterStatus defines the observed state of VTCluster - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource + type: object + minReadySeconds: + format: int32 + type: integer + nodeSelector: + additionalProperties: + type: string + type: object + paused: + type: boolean + podMetadata: properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object + name: type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} ---- -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - annotations: - controller-gen.kubebuilder.io/version: v0.18.0 - name: vtsingles.operator.victoriametrics.com -spec: - group: operator.victoriametrics.com - names: - kind: VTSingle - listKind: VTSingleList - plural: vtsingles - singular: vtsingle - scope: Namespaced - versions: - - additionalPrinterColumns: - - description: Current status of traces instance update process - jsonPath: .status.status - name: Status - type: string - - jsonPath: .metadata.creationTimestamp - name: Age - type: date - name: v1 - schema: - openAPIV3Schema: - description: |- - VTSingle is fast, cost-effective and scalable traces database. - VTSingle is the Schema for the API - properties: - apiVersion: - description: |- - APIVersion defines the versioned schema of this representation of an object. - Servers should convert recognized schemas to the latest internal value, and - may reject unrecognized values. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources - type: string - kind: - description: |- - Kind is a string value representing the REST resource this object represents. - Servers may infer this from the endpoint the client submits requests to. - Cannot be updated. - In CamelCase. - More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds - type: string - metadata: - type: object - spec: - description: VTSingleSpec defines the desired state of VTSingle - properties: - affinity: - description: Affinity If specified, the pod's scheduling constraints. - type: object - x-kubernetes-preserve-unknown-fields: true - configMaps: - description: |- - ConfigMaps is a list of ConfigMaps in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/configs/CONFIGMAP_NAME folder - items: + type: object + port: type: string - type: array - containers: - description: |- - Containers property allows to inject additions sidecars or to patch existing containers. - It can be useful for proxies, backup, etc. - items: - description: A single application container that you want to run - within a pod. - required: - - name + priorityClassName: + type: string + readinessGates: + items: + properties: + conditionType: + type: string + required: + - conditionType + type: object + type: array + readinessProbe: + type: object + x-kubernetes-preserve-unknown-fields: true + replicaCount: + format: int32 + type: integer + resources: + properties: + claims: + items: + properties: + name: + type: string + request: + type: string + required: + - name + type: object + type: array + x-kubernetes-list-map-keys: + - name + x-kubernetes-list-type: map + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + retentionMaxDiskSpaceUsageBytes: + type: string + retentionPeriod: + pattern: ^[0-9]+(h|d|w|y)?$ + type: string + revisionHistoryLimitCount: + format: int32 + type: integer + runtimeClassName: + type: string + schedulerName: + type: string + secrets: + items: + type: string + type: array + securityContext: type: object x-kubernetes-preserve-unknown-fields: true - type: array - disableAutomountServiceAccountToken: - description: |- - DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0). - Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access. - For example, vmagent and vm-config-reloader requires k8s API access. - Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed. - And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount. - type: boolean - disableSelfServiceScrape: - description: |- - DisableSelfServiceScrape controls creation of VMServiceScrape by operator - for the application. - Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable - type: boolean - dnsConfig: - description: |- - Specifies the DNS parameters of a pod. - Parameters specified here will be merged to the generated DNS - configuration based on DNSPolicy. - items: + serviceAccountName: + type: string + serviceScrapeSpec: + required: + - endpoints + type: object x-kubernetes-preserve-unknown-fields: true - properties: - nameservers: - description: |- - A list of DNS name server IP addresses. - This will be appended to the base nameservers generated from DNSPolicy. - Duplicated nameservers will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - options: - description: |- - A list of DNS resolver options. - This will be merged with the base options generated from DNSPolicy. - Duplicated entries will be removed. Resolution options given in Options - will override those that appear in the base DNSPolicy. - items: - description: PodDNSConfigOption defines DNS resolver options - of a pod. + serviceSpec: + properties: + metadata: properties: + annotations: + additionalProperties: + type: string + type: object + labels: + additionalProperties: + type: string + type: object name: - description: |- - Name is this DNS resolver option's name. - Required. - type: string - value: - description: Value is this DNS resolver option's value. type: string type: object - type: array - x-kubernetes-list-type: atomic - searches: - description: |- - A list of DNS search domains for host-name lookup. - This will be appended to the base search paths generated from DNSPolicy. - Duplicated search paths will be removed. - items: - type: string - type: array - x-kubernetes-list-type: atomic - type: object - dnsPolicy: - description: DNSPolicy sets DNS policy for the pod - type: string - extraArgs: - additionalProperties: - type: string - description: |- - ExtraArgs that will be passed to the application container - for example remoteWrite.tmpDataPath: /tmp - type: object - extraEnvs: - description: ExtraEnvs that will be passed to the application container - items: - description: EnvVar represents an environment variable present in - a Container. - properties: - name: - description: |- - Name of the environment variable. - May consist of any printable ASCII characters except '='. - type: string - value: - description: |- - Variable references $(VAR_NAME) are expanded - using the previously defined environment variables in the container and - any service environment variables. If a variable cannot be resolved, - the reference in the input string will be unchanged. Double $$ are reduced - to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e. - "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". - Escaped references will never be expanded, regardless of whether the variable - exists or not. - Defaults to "". - type: string + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + useAsDefault: + type: boolean required: - - name + - spec + type: object + startupProbe: type: object x-kubernetes-preserve-unknown-fields: true - type: array - extraEnvsFrom: - description: |- - ExtraEnvsFrom defines source of env variables for the application container - could either be secret or configmap - items: - description: EnvFromSource represents the source of a set of ConfigMaps - or Secrets + storage: properties: - configMapRef: - description: The ConfigMap to select from + accessModes: + items: + type: string + type: array + x-kubernetes-list-type: atomic + dataSource: properties: + apiGroup: + type: string + kind: + type: string name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the ConfigMap must be defined - type: boolean + required: + - kind + - name type: object x-kubernetes-map-type: atomic - prefix: - description: |- - Optional text to prepend to the name of each environment variable. - May consist of any printable ASCII characters except '='. - type: string - secretRef: - description: The Secret to select from + dataSourceRef: properties: + apiGroup: + type: string + kind: + type: string name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names type: string - optional: - description: Specify whether the Secret must be defined - type: boolean + namespace: + type: string + required: + - kind + - name + type: object + resources: + properties: + limits: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + requests: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + type: object + selector: + properties: + matchExpressions: + items: + properties: + key: + type: string + operator: + type: string + values: + items: + type: string + type: array + x-kubernetes-list-type: atomic + required: + - key + - operator + type: object + type: array + x-kubernetes-list-type: atomic + matchLabels: + additionalProperties: + type: string + type: object type: object x-kubernetes-map-type: atomic - type: object - type: array - futureRetention: - description: |- - FutureRetention for the stored traces - Log entries with timestamps bigger than now+futureRetention are rejected during data ingestion; - see https://docs.victoriametrics.com/victoriatraces/#configure-and-run-victoriatraces - pattern: ^[0-9]+(h|d|y)?$ - type: string - host_aliases: - description: |- - HostAliasesUnderScore provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - Has Priority over hostAliases field - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. + storageClassName: type: string - required: - - ip - type: object - type: array - hostAliases: - description: |- - HostAliases provides mapping for ip and hostname, - that would be propagated to pod, - cannot be used with HostNetwork. - items: - description: |- - HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the - pod's hosts file. - properties: - hostnames: - description: Hostnames for the above IP address. - items: - type: string - type: array - x-kubernetes-list-type: atomic - ip: - description: IP address of the host file entry. + volumeAttributesClassName: type: string - required: - - ip - type: object - type: array - hostNetwork: - description: HostNetwork controls whether the pod may use the node - network namespace - type: boolean - image: - description: |- - Image - docker image settings - if no specified operator uses default version from operator config - properties: - pullPolicy: - description: PullPolicy describes how to pull docker image - type: string - repository: - description: Repository contains name of docker image + it's repository - if needed - type: string - tag: - description: Tag contains desired docker image version - type: string - type: object - imagePullSecrets: - description: |- - ImagePullSecrets An optional list of references to secrets in the same namespace - to use for pulling images from registries - see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod - items: - description: |- - LocalObjectReference contains enough information to let you locate the - referenced object inside the same namespace. - properties: - name: - default: "" - description: |- - Name of the referent. - This field is effectively required, but due to backwards compatibility is - allowed to be empty. Instances of this type with an empty value here are - almost certainly wrong. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + volumeMode: type: string - type: object - x-kubernetes-map-type: atomic - type: array - initContainers: - description: |- - InitContainers allows adding initContainers to the pod definition. - Any errors during the execution of an initContainer will lead to a restart of the Pod. - More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ - items: - description: A single application container that you want to run - within a pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - livenessProbe: - description: LivenessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - logFormat: - description: LogFormat for VTSingle to be configured with. - enum: - - default - - json - type: string - logIngestedRows: - description: |- - Whether to log all the ingested log entries; this can be useful for debugging of data ingestion; - see https://docs.victoriametrics.com/victoriatraces/#configure-and-run-victoriatraces - type: boolean - logLevel: - description: LogLevel for VictoriaTraces to be configured with. - enum: - - INFO - - WARN - - ERROR - - FATAL - - PANIC - type: string - logNewStreams: - description: |- - LogNewStreams Whether to log creation of new streams; this can be useful for debugging of high cardinality issues with log streams; - see https://docs.victoriametrics.com/victoriatraces/#configure-and-run-victoriatraces - type: boolean - managedMetadata: - description: |- - ManagedMetadata defines metadata that will be added to the all objects - created by operator for the given CustomResource - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: + volumeName: type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - type: object - minReadySeconds: - description: |- - MinReadySeconds defines a minimum number of seconds to wait before starting update next pod - if previous in healthy state - Has no effect for VLogs and VMSingle - format: int32 - type: integer - nodeSelector: - additionalProperties: + type: object + storageDataPath: type: string - description: NodeSelector Define which Nodes the Pods are scheduled - on. - type: object - paused: - description: |- - Paused If set to true all actions on the underlying managed objects are not - going to be performed, except for delete actions. - type: boolean - podMetadata: - description: PodMetadata configures Labels and Annotations which are - propagated to the VTSingle pods. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - port: - description: Port listen address - type: string - priorityClassName: - description: PriorityClassName class assigned to the Pods - type: string - readinessGates: - description: ReadinessGates defines pod readiness gates - items: - description: PodReadinessGate contains the reference to a pod condition + storageMetadata: properties: - conditionType: - description: ConditionType refers to a condition in the pod's - condition list with matching type. - type: string - required: - - conditionType - type: object - type: array - readinessProbe: - description: ReadinessProbe that will be added CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - replicaCount: - description: ReplicaCount is the expected size of the Application. - format: int32 - type: integer - resources: - description: |- - Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - if not defined default resources from operator config will be used - properties: - claims: - description: |- - Claims lists the names of resources, defined in spec.resourceClaims, - that are used by this container. - - This field depends on the - DynamicResourceAllocation feature gate. - - This field is immutable. It can only be set for containers. - items: - description: ResourceClaim references one entry in PodSpec.ResourceClaims. - properties: - name: - description: |- - Name must match the name of one entry in pod.spec.resourceClaims of - the Pod where this field is used. It makes that resource available - inside a container. - type: string - request: - description: |- - Request is the name chosen for a request in the referenced claim. - If empty, everything from the claim is made available, otherwise - only the result of this request. - type: string - required: - - name + annotations: + additionalProperties: + type: string type: object - type: array - x-kubernetes-list-map-keys: - - name - x-kubernetes-list-type: map - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - type: object - retentionMaxDiskSpaceUsageBytes: - description: |- - RetentionMaxDiskSpaceUsageBytes for the stored traces - VictoriaTraces keeps at least two last days of data in order to guarantee that the traces for the last day can be returned in queries. - This means that the total disk space usage may exceed the -retention.maxDiskSpaceUsageBytes, - if the size of the last two days of data exceeds the -retention.maxDiskSpaceUsageBytes. - https://docs.victoriametrics.com/victoriatraces/#configure-and-run-victoriatraces - type: string - retentionPeriod: - description: |- - RetentionPeriod for the stored traces - https://docs.victoriametrics.com/victoriatraces/#configure-and-run-victoriatraces - pattern: ^[0-9]+(h|d|w|y)?$ - type: string - revisionHistoryLimitCount: - description: |- - The number of old ReplicaSets to retain to allow rollback in deployment or - maximum number of revisions that will be maintained in the Deployment revision history. - Has no effect at StatefulSets - Defaults to 10. - format: int32 - type: integer - runtimeClassName: - description: |- - RuntimeClassName - defines runtime class for kubernetes pod. - https://kubernetes.io/docs/concepts/containers/runtime-class/ - type: string - schedulerName: - description: SchedulerName - defines kubernetes scheduler name - type: string - secrets: - description: |- - Secrets is a list of Secrets in the same namespace as the Application - object, which shall be mounted into the Application container - at /etc/vm/secrets/SECRET_NAME folder - items: - type: string - type: array - securityContext: - description: |- - SecurityContext holds pod-level security attributes and common container settings. - This defaults to the default PodSecurityContext. - type: object - x-kubernetes-preserve-unknown-fields: true - serviceAccountName: - description: ServiceAccountName is the name of the ServiceAccount - to use to run the pods - type: string - serviceScrapeSpec: - description: ServiceScrapeSpec that will be added to vtsingle VMServiceScrape - spec - required: - - endpoints - type: object - x-kubernetes-preserve-unknown-fields: true - serviceSpec: - description: ServiceSpec that will be added to vtsingle service spec - properties: - metadata: - description: EmbeddedObjectMetadata defines objectMeta for additional - service. - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels - type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names + labels: + additionalProperties: type: string - type: object - spec: - description: |- - ServiceSpec describes the attributes that a user creates on a service. - More info: https://kubernetes.io/docs/concepts/services-networking/service/ - type: object - x-kubernetes-preserve-unknown-fields: true - useAsDefault: - description: |- - UseAsDefault applies changes from given service definition to the main object Service - Changing from headless service to clusterIP or loadbalancer may break cross-component communication - type: boolean - required: - - spec - type: object - startupProbe: - description: StartupProbe that will be added to CRD pod - type: object - x-kubernetes-preserve-unknown-fields: true - storage: - description: |- - Storage is the definition of how storage will be used by the VTSingle - by default it`s empty dir - properties: - accessModes: - description: |- - accessModes contains the desired access modes the volume should have. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1 - items: + type: object + name: type: string - type: array - x-kubernetes-list-type: atomic - dataSource: - description: |- - dataSource field can be used to specify either: - * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) - * An existing PVC (PersistentVolumeClaim) - If the provisioner or an external controller can support the specified data source, - it will create a new volume based on the contents of the specified data source. - When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef, - and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified. - If the namespace is specified, then dataSourceRef will not be copied to dataSource. + type: object + terminationGracePeriodSeconds: + format: int64 + type: integer + tolerations: + items: properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. + effect: type: string - kind: - description: Kind is the type of resource being referenced + key: type: string - name: - description: Name is the name of resource being referenced + operator: + type: string + tolerationSeconds: + format: int64 + type: integer + value: type: string + type: object + type: array + topologySpreadConstraints: + items: required: - - kind - - name + - maxSkew + - topologyKey + - whenUnsatisfiable type: object - x-kubernetes-map-type: atomic - dataSourceRef: - description: |- - dataSourceRef specifies the object from which to populate the volume with data, if a non-empty - volume is desired. This may be any object from a non-empty API group (non - core object) or a PersistentVolumeClaim object. - When this field is specified, volume binding will only succeed if the type of - the specified object matches some installed volume populator or dynamic - provisioner. - This field will replace the functionality of the dataSource field and as such - if both fields are non-empty, they must have the same value. For backwards - compatibility, when namespace isn't specified in dataSourceRef, - both fields (dataSource and dataSourceRef) will be set to the same - value automatically if one of them is empty and the other is non-empty. - When namespace is specified in dataSourceRef, - dataSource isn't set to the same value and must be empty. - There are three important differences between dataSource and dataSourceRef: - * While dataSource only allows two specific types of objects, dataSourceRef - allows any non-core object, as well as PersistentVolumeClaim objects. - * While dataSource ignores disallowed values (dropping them), dataSourceRef - preserves all values, and generates an error if a disallowed value is - specified. - * While dataSource only allows local objects, dataSourceRef allows objects - in any namespaces. - (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled. - (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + x-kubernetes-preserve-unknown-fields: true + type: array + useDefaultResources: + type: boolean + useStrictSecurity: + type: boolean + volumeMounts: + items: properties: - apiGroup: - description: |- - APIGroup is the group for the resource being referenced. - If APIGroup is not specified, the specified Kind must be in the core API group. - For any other third-party types, APIGroup is required. + mountPath: type: string - kind: - description: Kind is the type of resource being referenced + mountPropagation: type: string name: - description: Name is the name of resource being referenced type: string - namespace: - description: |- - Namespace is the namespace of resource being referenced - Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details. - (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled. + readOnly: + type: boolean + recursiveReadOnly: + type: string + subPath: + type: string + subPathExpr: type: string required: - - kind - - name + - mountPath + - name type: object - resources: - description: |- - resources represents the minimum resources the volume should have. - If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements - that are lower than previous value but must still be higher than capacity recorded in the - status field of the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources - properties: - limits: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Limits describes the maximum amount of compute resources allowed. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object - requests: - additionalProperties: - anyOf: - - type: integer - - type: string - pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ - x-kubernetes-int-or-string: true - description: |- - Requests describes the minimum amount of compute resources required. - If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, - otherwise to an implementation-defined value. Requests cannot exceed Limits. - More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ - type: object + type: array + volumes: + items: + required: + - name type: object - selector: - description: selector is a label query over volumes to consider - for binding. + x-kubernetes-preserve-unknown-fields: true + type: array + type: object + status: + properties: + conditions: + items: properties: - matchExpressions: - description: matchExpressions is a list of label selector - requirements. The requirements are ANDed. - items: - description: |- - A label selector requirement is a selector that contains values, a key, and an operator that - relates the key and values. - properties: - key: - description: key is the label key that the selector - applies to. - type: string - operator: - description: |- - operator represents a key's relationship to a set of values. - Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: |- - values is an array of string values. If the operator is In or NotIn, - the values array must be non-empty. If the operator is Exists or DoesNotExist, - the values array must be empty. This array is replaced during a strategic - merge patch. - items: - type: string - type: array - x-kubernetes-list-type: atomic - required: - - key - - operator - type: object - type: array - x-kubernetes-list-type: atomic - matchLabels: - additionalProperties: - type: string - description: |- - matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels - map is equivalent to an element of matchExpressions, whose key field is "key", the - operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - x-kubernetes-map-type: atomic - storageClassName: - description: |- - storageClassName is the name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1 - type: string - volumeAttributesClassName: - description: |- - volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim. - If specified, the CSI driver will create or update the volume with the attributes defined - in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName, - it can be changed after the claim is created. An empty string or nil value indicates that no - VolumeAttributesClass will be applied to the claim. If the claim enters an Infeasible error state, - this field can be reset to its previous value (including nil) to cancel the modification. - If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be - set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource - exists. - More info: https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/ - type: string - volumeMode: - description: |- - volumeMode defines what type of volume is required by the claim. - Value of Filesystem is implied when not included in claim spec. - type: string - volumeName: - description: volumeName is the binding reference to the PersistentVolume - backing this claim. - type: string - type: object - storageDataPath: - description: |- - StorageDataPath disables spec.storage option and overrides arg for victoria-traces binary --storageDataPath, - its users responsibility to mount proper device into given path. - type: string - storageMetadata: - description: StorageMeta defines annotations and labels attached to - PVC for given vtsingle CR - properties: - annotations: - additionalProperties: - type: string - description: |- - Annotations is an unstructured key value map stored with a resource that may be - set by external tools to store and retrieve arbitrary metadata. They are not - queryable and should be preserved when modifying objects. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations - type: object - labels: - additionalProperties: - type: string - description: |- - Labels Map of string keys and values that can be used to organize and categorize - (scope and select) objects. May match selectors of replication controllers - and services. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels + lastTransitionTime: + format: date-time + type: string + lastUpdateTime: + format: date-time + type: string + message: + maxLength: 32768 + type: string + observedGeneration: + format: int64 + minimum: 0 + type: integer + reason: + maxLength: 1024 + minLength: 1 + type: string + status: + enum: + - "True" + - "False" + - Unknown + type: string + type: + maxLength: 316 + type: string + required: + - lastTransitionTime + - lastUpdateTime + - reason + - status + - type type: object - name: - description: |- - Name must be unique within a namespace. Is required when creating resources, although - some resources may allow a client to request the generation of an appropriate name - automatically. Name is primarily intended for creation idempotence and configuration - definition. - Cannot be updated. - More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names - type: string - type: object - terminationGracePeriodSeconds: - description: TerminationGracePeriodSeconds period for container graceful - termination - format: int64 - type: integer - tolerations: - description: Tolerations If specified, the pod's tolerations. - items: - description: |- - The pod this Toleration is attached to tolerates any taint that matches - the triple using the matching operator . - properties: - effect: - description: |- - Effect indicates the taint effect to match. Empty means match all taint effects. - When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute. - type: string - key: - description: |- - Key is the taint key that the toleration applies to. Empty means match all taint keys. - If the key is empty, operator must be Exists; this combination means to match all values and all keys. - type: string - operator: - description: |- - Operator represents a key's relationship to the value. - Valid operators are Exists and Equal. Defaults to Equal. - Exists is equivalent to wildcard for value, so that a pod can - tolerate all taints of a particular category. - type: string - tolerationSeconds: - description: |- - TolerationSeconds represents the period of time the toleration (which must be - of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, - it is not set, which means tolerate the taint forever (do not evict). Zero and - negative values will be treated as 0 (evict immediately) by the system. - format: int64 - type: integer - value: - description: |- - Value is the taint value the toleration matches to. - If the operator is Exists, the value should be empty, otherwise just a regular string. - type: string - type: object - type: array - topologySpreadConstraints: - description: |- - TopologySpreadConstraints embedded kubernetes pod configuration option, - controls how pods are spread across your cluster among failure-domains - such as regions, zones, nodes, and other user-defined topology domains - https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/ - items: - description: TopologySpreadConstraint specifies how to spread matching - pods among the given topology. - required: - - maxSkew - - topologyKey - - whenUnsatisfiable - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - useDefaultResources: - description: |- - UseDefaultResources controls resource settings - By default, operator sets built-in resource requirements - type: boolean - useStrictSecurity: - description: |- - UseStrictSecurity enables strict security mode for component - it restricts disk writes access - uses non-root user out of the box - drops not needed security permissions - type: boolean - volumeMounts: - description: |- - VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition. - VolumeMounts specified will be appended to other VolumeMounts in the Application container - items: - description: VolumeMount describes a mounting of a Volume within - a container. - properties: - mountPath: - description: |- - Path within the container at which the volume should be mounted. Must - not contain ':'. - type: string - mountPropagation: - description: |- - mountPropagation determines how mounts are propagated from the host - to container and the other way around. - When not set, MountPropagationNone is used. - This field is beta in 1.10. - When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified - (which defaults to None). - type: string - name: - description: This must match the Name of a Volume. - type: string - readOnly: - description: |- - Mounted read-only if true, read-write otherwise (false or unspecified). - Defaults to false. - type: boolean - recursiveReadOnly: - description: |- - RecursiveReadOnly specifies whether read-only mounts should be handled - recursively. - - If ReadOnly is false, this field has no meaning and must be unspecified. - - If ReadOnly is true, and this field is set to Disabled, the mount is not made - recursively read-only. If this field is set to IfPossible, the mount is made - recursively read-only, if it is supported by the container runtime. If this - field is set to Enabled, the mount is made recursively read-only if it is - supported by the container runtime, otherwise the pod will not be started and - an error will be generated to indicate the reason. - - If this field is set to IfPossible or Enabled, MountPropagation must be set to - None (or be unspecified, which defaults to None). - - If this field is not specified, it is treated as an equivalent of Disabled. - type: string - subPath: - description: |- - Path within the volume from which the container's volume should be mounted. - Defaults to "" (volume's root). - type: string - subPathExpr: - description: |- - Expanded path within the volume from which the container's volume should be mounted. - Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment. - Defaults to "" (volume's root). - SubPathExpr and SubPath are mutually exclusive. - type: string - required: - - mountPath - - name - type: object - type: array - volumes: - description: |- - Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition. - Volumes specified will be appended to other volumes that are generated. - / +optional - items: - description: Volume represents a named volume in a pod that may - be accessed by any container in the pod. - required: - - name - type: object - x-kubernetes-preserve-unknown-fields: true - type: array - type: object - status: - description: VTSingleStatus defines the observed state of VTSingle - properties: - conditions: - description: 'Known .status.conditions.type are: "Available", "Progressing", - and "Degraded"' - items: - description: Condition defines status condition of the resource - properties: - lastTransitionTime: - description: lastTransitionTime is the last time the condition - transitioned from one status to another. - format: date-time - type: string - lastUpdateTime: - description: |- - LastUpdateTime is the last time of given type update. - This value is used for status TTL update and removal - format: date-time - type: string - message: - description: |- - message is a human readable message indicating details about the transition. - This may be an empty string. - maxLength: 32768 - type: string - observedGeneration: - description: |- - observedGeneration represents the .metadata.generation that the condition was set based upon. - For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date - with respect to the current state of the instance. - format: int64 - minimum: 0 - type: integer - reason: - description: |- - reason contains a programmatic identifier indicating the reason for the condition's last transition. - Producers of specific condition types may define expected values and meanings for this field, - and whether the values are considered a guaranteed API. - The value should be a CamelCase string. - This field may not be empty. - maxLength: 1024 - minLength: 1 - type: string - status: - description: status of the condition, one of True, False, Unknown. - enum: - - "True" - - "False" - - Unknown - type: string - type: - description: Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase. - maxLength: 316 - type: string - required: - - lastTransitionTime - - lastUpdateTime - - reason - - status - - type - type: object - type: array - x-kubernetes-list-map-keys: - - type - x-kubernetes-list-type: map - observedGeneration: - description: |- - ObservedGeneration defines current generation picked by operator for the - reconcile - format: int64 - type: integer - reason: - description: Reason defines human readable error reason - type: string - updateStatus: - description: UpdateStatus defines a status for update rollout - type: string - type: object - type: object - served: true - storage: true - subresources: - status: {} + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + observedGeneration: + format: int64 + type: integer + reason: + type: string + updateStatus: + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/examples/vmdistributedcluster-new-objects.yaml b/config/examples/vmdistributedcluster-new-objects.yaml new file mode 100644 index 000000000..373b2fdff --- /dev/null +++ b/config/examples/vmdistributedcluster-new-objects.yaml @@ -0,0 +1,87 @@ +apiVersion: operator.victoriametrics.com/v1alpha1 +kind: VMDistributedCluster +metadata: + name: vmdistributedcluster-sample-new +spec: + vmagent: + name: global-write-vmagent + spec: + replicaCount: 1 + vmauth: + name: global-read-vmauth + spec: + replicaCount: 1 + zones: + vmclusters: + - name: vmcluster-us-east-1 + spec: + retentionPeriod: "4" + replicationFactor: 2 + vmstorage: + replicaCount: 2 + storageDataPath: "/vm-data" + storage: + volumeClaimTemplate: + spec: + resources: + requests: + storage: 10Gi + vmselect: + replicaCount: 2 + cacheMountPath: "/select-cache" + storage: + volumeClaimTemplate: + spec: + resources: + requests: + storage: 2Gi + vminsert: + replicaCount: 2 + - name: vmcluster-us-west-2 + spec: + retentionPeriod: "4" + replicationFactor: 2 + vmstorage: + replicaCount: 2 + storageDataPath: "/vm-data" + storage: + volumeClaimTemplate: + spec: + resources: + requests: + storage: 10Gi + vmselect: + replicaCount: 2 + cacheMountPath: "/select-cache" + storage: + volumeClaimTemplate: + spec: + resources: + requests: + storage: 2Gi + vminsert: + replicaCount: 2 + - name: vmcluster-eu-west-1 + spec: + retentionPeriod: "4" + replicationFactor: 2 + vmstorage: + replicaCount: 2 + storageDataPath: "/vm-data" + storage: + volumeClaimTemplate: + spec: + resources: + requests: + storage: 10Gi + vmselect: + replicaCount: 2 + cacheMountPath: "/select-cache" + storage: + volumeClaimTemplate: + spec: + resources: + requests: + storage: 2Gi + vminsert: + replicaCount: 2 diff --git a/config/examples/vmdistributedcluster-overrides-version.yaml b/config/examples/vmdistributedcluster-overrides-version.yaml new file mode 100644 index 000000000..5e4973987 --- /dev/null +++ b/config/examples/vmdistributedcluster-overrides-version.yaml @@ -0,0 +1,51 @@ +apiVersion: operator.victoriametrics.com/v1alpha1 +kind: VMDistributedCluster +metadata: + name: vmdistributedcluster-sample-override-versions +spec: + vmagent: + name: global-write-vmagent + spec: + replicaCount: 1 + vmauth: + name: global-read-vmauth + spec: + replicaCount: 1 + zones: + vmclusters: + - ref: + name: vmcluster-us-east-1 + overrideSpec: + vmselect: + image: + tag: v1.90.0 + vminsert: + image: + tag: v1.90.0 + vmstorage: + image: + tag: v1.90.0 + - ref: + name: vmcluster-us-west-2 + overrideSpec: + vmselect: + image: + tag: v1.90.0 + vminsert: + image: + tag: v1.90.0 + vmstorage: + image: + tag: v1.90.0 + - ref: + name: vmcluster-eu-west-1 + overrideSpec: + vmselect: + image: + tag: v1.111.0 + vminsert: + image: + tag: v1.111.0 + vmstorage: + image: + tag: v1.111.0 diff --git a/config/examples/vmdistributedcluster-overrides.yaml b/config/examples/vmdistributedcluster-overrides.yaml new file mode 100644 index 000000000..8c531b54f --- /dev/null +++ b/config/examples/vmdistributedcluster-overrides.yaml @@ -0,0 +1,66 @@ +apiVersion: operator.victoriametrics.com/v1beta1 +kind: VMCluster +metadata: + name: vmcluster-us-east-1 +spec: + vmstorage: + replicaCount: 1 + vmselect: + replicaCount: 1 + vminsert: + replicaCount: 1 +--- +apiVersion: operator.victoriametrics.com/v1beta1 +kind: VMCluster +metadata: + name: vmcluster-us-west-2 +spec: + vmstorage: + replicaCount: 1 + vmselect: + replicaCount: 1 + vminsert: + replicaCount: 1 +--- +apiVersion: operator.victoriametrics.com/v1beta1 +kind: VMCluster +metadata: + name: vmcluster-eu-west-1 +spec: + vmstorage: + replicaCount: 1 + vmselect: + replicaCount: 1 + vminsert: + replicaCount: 1 +--- +apiVersion: operator.victoriametrics.com/v1alpha1 +kind: VMDistributedCluster +metadata: + name: vmdistributedcluster-sample-override +spec: + vmagent: + name: global-write-vmagent + spec: + replicaCount: 1 + vmauth: + name: global-read-vmauth + spec: + replicaCount: 1 + zones: + vmclusters: + - ref: + name: vmcluster-us-east-1 + overrideSpec: + vmselect: + replicaCount: 3 + - ref: + name: vmcluster-us-west-2 + overrideSpec: + vmselect: + replicaCount: 4 + - ref: + name: vmcluster-eu-west-1 + overrideSpec: + vmselect: + replicaCount: 2 diff --git a/config/examples/vmdistributedcluster-paused.yaml b/config/examples/vmdistributedcluster-paused.yaml new file mode 100644 index 000000000..088a4d79d --- /dev/null +++ b/config/examples/vmdistributedcluster-paused.yaml @@ -0,0 +1,28 @@ +apiVersion: operator.victoriametrics.com/v1alpha1 +kind: VMDistributedCluster +metadata: + name: vmdistributedcluster-sample-paused +spec: + paused: true + vmagent: + name: global-write-vmagent + spec: + replicaCount: 1 + vmauth: + name: global-read-vmauth + spec: + replicaCount: 1 + zones: + vmclusters: + - ref: vmcluster-us-east-1 + overrideSpec: + vmselect: + replicaCount: 3 + - ref: vmcluster-us-west-2 + overrideSpec: + vmselect: + replicaCount: 4 + - ref: vmcluster-eu-west-1 + overrideSpec: + vmselect: + replicaCount: 2 diff --git a/config/examples/vmdistributedcluster-timeouts.yaml b/config/examples/vmdistributedcluster-timeouts.yaml new file mode 100644 index 000000000..21f2a14a9 --- /dev/null +++ b/config/examples/vmdistributedcluster-timeouts.yaml @@ -0,0 +1,29 @@ +apiVersion: operator.victoriametrics.com/v1alpha1 +kind: VMDistributedCluster +metadata: + name: vmdistributedcluster-sample-custom-timeout +spec: + readyDeadline: 10m + zoneUpdatePause: 1m + vmagent: + name: global-write-vmagent + spec: + replicaCount: 1 + vmauth: + name: global-read-vmauth + spec: + replicaCount: 1 + zones: + vmclusters: + - ref: vmcluster-us-east-1 + overrideSpec: + vmselect: + replicaCount: 3 + - ref: vmcluster-us-west-2 + overrideSpec: + vmselect: + replicaCount: 4 + - ref: vmcluster-eu-west-1 + overrideSpec: + vmselect: + replicaCount: 2 diff --git a/config/examples/vmdistributedcluster-vmagent.yaml b/config/examples/vmdistributedcluster-vmagent.yaml new file mode 100644 index 000000000..9f0d8502b --- /dev/null +++ b/config/examples/vmdistributedcluster-vmagent.yaml @@ -0,0 +1,49 @@ +apiVersion: operator.victoriametrics.com/v1alpha1 +kind: VMDistributedCluster +metadata: + name: vmdistributedcluster-sample-vmagent +spec: + vmagent: + name: global-write-vmagent + spec: + image: + repository: victoriametrics/vmagent + pullPolicy: IfNotPresent + replicaCount: 1 + resources: + requests: + cpu: "250m" + memory: "350Mi" + limits: + cpu: "500m" + memory: "850Mi" + vmauth: + name: global-read-vmauth + spec: + replicaCount: 1 + zones: + vmclusters: + - name: vmcluster-us-east-1 + spec: + vmstorage: + replicaCount: 1 + vmselect: + replicaCount: 1 + vminsert: + replicaCount: 1 + - name: vmcluster-us-west-2 + spec: + vmstorage: + replicaCount: 1 + vmselect: + replicaCount: 1 + vminsert: + replicaCount: 1 + - name: vmcluster-eu-west-1 + spec: + vmstorage: + replicaCount: 1 + vmselect: + replicaCount: 1 + vminsert: + replicaCount: 1 diff --git a/config/examples/vmdistributedcluster-vmauth.yaml b/config/examples/vmdistributedcluster-vmauth.yaml new file mode 100644 index 000000000..597cfbac3 --- /dev/null +++ b/config/examples/vmdistributedcluster-vmauth.yaml @@ -0,0 +1,49 @@ +apiVersion: operator.victoriametrics.com/v1alpha1 +kind: VMDistributedCluster +metadata: + name: vmdistributedcluster-sample-vmauth +spec: + vmagent: + name: global-write-vmagent + spec: + replicaCount: 1 + vmauth: + name: global-read-vmauth + spec: + image: + repository: victoriametrics/vmauth + pullPolicy: IfNotPresent + replicaCount: 1 + resources: + requests: + cpu: "250m" + memory: "350Mi" + limits: + cpu: "500m" + memory: "850Mi" + zones: + vmclusters: + - name: vmcluster-us-east-1 + spec: + vmstorage: + replicaCount: 1 + vmselect: + replicaCount: 1 + vminsert: + replicaCount: 1 + - name: vmcluster-us-west-2 + spec: + vmstorage: + replicaCount: 1 + vmselect: + replicaCount: 1 + vminsert: + replicaCount: 1 + - name: vmcluster-eu-west-1 + spec: + vmstorage: + replicaCount: 1 + vmselect: + replicaCount: 1 + vminsert: + replicaCount: 1 diff --git a/config/rbac/role.yaml b/config/rbac/role.yaml index ec6058681..06275d555 100644 --- a/config/rbac/role.yaml +++ b/config/rbac/role.yaml @@ -198,6 +198,9 @@ rules: - vmanomalies - vmanomalies/finalizers - vmanomalies/status + - vmdistributedclusters + - vmdistributedclusters/finalizers + - vmdistributedclusters/status verbs: - '*' - apiGroups: diff --git a/config/samples/operator_v1alpha1_vmdistributedcluster.yaml b/config/samples/operator_v1alpha1_vmdistributedcluster.yaml new file mode 100644 index 000000000..965b5b62f --- /dev/null +++ b/config/samples/operator_v1alpha1_vmdistributedcluster.yaml @@ -0,0 +1,31 @@ +apiVersion: operator.victoriametrics.com/v1alpha1 +kind: VMDistributedCluster +metadata: + labels: + app.kubernetes.io/name: victoriametrics-operator + app.kubernetes.io/managed-by: kustomize + name: vmdistributedcluster-sample-override +spec: + vmagent: + name: vmagent-sample + vmusers: + - name: vmuser-us-east-1 + - name: vmuser-us-west-2 + - name: vmuser-eu-west-1 + zones: + vmclusters: + - ref: + name: vmcluster-us-east-1 + overrideSpec: + vmselect: + replicaCount: 2 + - ref: + name: vmcluster-us-west-2 + overrideSpec: + vmselect: + replicaCount: 2 + - ref: + name: vmcluster-eu-west-1 + overrideSpec: + vmselect: + replicaCount: 2 diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index d6913adcc..8b5bbef82 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -55,6 +55,8 @@ SECURITY: upgrade Go builder from Go1.25.4 to Go1.25.5. See [the list of issues * BUGFIX: [vtcluster](https://docs.victoriametrics.com/operator/resources/vtcluster/): properly print `status` replicas for `insert`, `select` and `storage` components. +* FEATURE: [vmoperator](https://docs.victoriametrics.com/operator/): add `VMDistributedCluster` CR to apply changes to zone-distributed VictoriaMetrics clusters. + ## [v0.65.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.65.0) **Release date:** 31 October 2025 diff --git a/docs/resources/vmdistributedcluster.md b/docs/resources/vmdistributedcluster.md new file mode 100644 index 000000000..ffdd69aab --- /dev/null +++ b/docs/resources/vmdistributedcluster.md @@ -0,0 +1,120 @@ +--- +weight: 12 +title: VMDistributedCluster +menu: + docs: + identifier: operator-cr-vmdistributedcluster + parent: operator-cr + weight: 12 +aliases: + - /operator/resources/vmdistributedcluster/ +tags: + - CRD + - VMDistributedCluster +--- + +`VMDistributedCluster` is the Custom Resource Definition for orchestrated update of several VictoriaMetrics clusters. It allows you to define and manage cluster components of a distributed VictoriaMetrics setup and apply changes to them without downtime or disruption. + +For a high-level overview of VictoriaMetrics distributed cluster architecture, refer to the official [VictoriaMetrics documentation](https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/). + +## Specification + +The `VMDistributedCluster` resource allows you to configure various aspects of your VictoriaMetrics distributed cluster. The specification includes details about: + +* `paused`: If set to `true`, the operator will not perform any actions on the underlying managed objects. Useful for temporarily halting reconciliation. +* `zones`: A list of objects, where each entry either defines or references a `VMCluster` instance. +* `vmagent`: A reference to a `VMAgent` object that will be configured to scrape metrics from all `VMCluster` instances managed by this `VMDistributedCluster`. +* `vmusers`: A list of references to `VMUser` objects. These `VMUser`s can be used to control access and routing to the managed `VMCluster` instances. + +### `VMClusterRefOrSpec` + +Each entry in the `zones` array is a `VMClusterRefOrSpec` object. This flexible structure allows you to either reference an existing `VMCluster` resource or define a new one inline. + +A `VMClusterRefOrSpec` object has the following mutually exclusive fields: + +* `ref`: A `corev1.LocalObjectReference` pointing to an existing `VMCluster` object by name. If `ref` is specified, `name` and `spec` are ignored. +* `overrideSpec`: An optional JSON object that specifies an override to the `VMClusterSpec` of the referenced object when `ref` is used. This allows applying common configuration changes across referenced clusters without modifying their original definitions. +* `name`: A static name to be used for the `VMCluster` when `spec` is provided. This field is ignored if `ref` is specified. +* `spec`: A `vmv1beta1.VMClusterSpec` object that defines the desired state of a new `VMCluster`. This field is ignored if `ref` is specified. + +**Example: Defining a `VMDistributedCluster` with inline `VMCluster` specifications for two zones:** + +```yaml +apiVersion: operator.victoriametrics.com/v1alpha1 +kind: VMDistributedCluster +metadata: + name: my-distributed-cluster +spec: + vmagent: + name: my-distributed-vmagent + vmusers: + - name: my-read-user-for-zone-a + - name: my-read-user-for-zone-b + zones: + vmclusters: + - name: zone-a + spec: + vmstorage: + replicaCount: 1 + storage: + volumeClaimTemplate: + spec: + resources: + requests: + storage: 10Gi + vmselect: + replicaCount: 1 + vminsert: + replicaCount: 1 + - name: zone-b + spec: + vmstorage: + replicaCount: 1 + storage: + volumeClaimTemplate: + spec: + resources: + requests: + storage: 10Gi + vmselect: + replicaCount: 1 + vminsert: + replicaCount: 1 + paused: false +``` + +**Example: Referencing existing `VMCluster` objects and applying an `overrideSpec`:** + +```yaml +apiVersion: operator.victoriametrics.com/v1alpha1 +kind: VMDistributedCluster +metadata: + name: referenced-distributed-cluster +spec: + zones: + - vmclusters: + ref: + name: existing-cluster-zone-1 + overrideSpec: + vmstorage: # Increase PVC for vmstorage in this zone + storage: + volumeClaimTemplate: + spec: + resources: + requests: + storage: 20Gi + - vmclusters: + ref: + name: existing-cluster-zone-2 + overrideSpec: + vmstorage: # Increase vmstorage replicas for this zone + replicaCount: 2 +``` + +### Current shortcomings +- When VMDistributedCluster is removed, all resources created inline are not deleted. +- Only VMCluster objects are supported +- Only one VMAgent can be referenced +- All objects must belong to the same namespace as VMDistributedCluster +- Referenced VMClusters are not being actively watched for changes, they only get reconciled periodically +- All objects must be referred to by name, label selectors are not supported diff --git a/internal/controller/operator/factory/build/defaults.go b/internal/controller/operator/factory/build/defaults.go index 6001867ae..f1591a880 100644 --- a/internal/controller/operator/factory/build/defaults.go +++ b/internal/controller/operator/factory/build/defaults.go @@ -10,6 +10,7 @@ import ( "k8s.io/utils/ptr" vmv1 "github.com/VictoriaMetrics/operator/api/operator/v1" + vmv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" vmv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" "github.com/VictoriaMetrics/operator/internal/config" ) @@ -23,6 +24,7 @@ func AddDefaults(scheme *runtime.Scheme) { scheme.AddTypeDefaultingFunc(&corev1.Service{}, addServiceDefaults) scheme.AddTypeDefaultingFunc(&appsv1.Deployment{}, addDeploymentDefaults) scheme.AddTypeDefaultingFunc(&appsv1.StatefulSet{}, addStatefulsetDefaults) + scheme.AddTypeDefaultingFunc(&vmv1alpha1.VMDistributedCluster{}, addVMDistributedClusterDefaults) scheme.AddTypeDefaultingFunc(&vmv1beta1.VMAuth{}, addVMAuthDefaults) scheme.AddTypeDefaultingFunc(&vmv1beta1.VMAgent{}, addVMAgentDefaults) scheme.AddTypeDefaultingFunc(&vmv1beta1.VMAlert{}, addVMAlertDefaults) @@ -557,7 +559,7 @@ func addDefaultsToCommonParams(common *vmv1beta1.CommonDefaultableParams, licens common.Image.Repository = formatContainerImage(c.ContainerRegistry, common.Image.Repository) if common.Image.Tag == "" { common.Image.Tag = appDefaults.Version - if license.IsProvided() { + if license != nil && license.IsProvided() { common.Image.Tag = addEntSuffixToTag(common.Image.Tag) } } @@ -1009,3 +1011,17 @@ func addEntSuffixToTag(versionTag string) string { return versionTag } + +func addVMDistributedClusterDefaults(objI any) { + cr, ok := objI.(*vmv1alpha1.VMDistributedCluster) + if !ok { + return + } + c := getCfg() + + cv := config.ApplicationDefaults(c.VMAuthDefault) + if cr.Spec.VMAuth.Spec == nil { + cr.Spec.VMAuth.Spec = &vmv1beta1.VMAuthLoadBalancerSpec{} + } + addDefaultsToCommonParams(&cr.Spec.VMAuth.Spec.CommonDefaultableParams, nil, &cv) +} diff --git a/internal/controller/operator/factory/finalize/vmdistributedcluster.go b/internal/controller/operator/factory/finalize/vmdistributedcluster.go new file mode 100644 index 000000000..e650c01d5 --- /dev/null +++ b/internal/controller/operator/factory/finalize/vmdistributedcluster.go @@ -0,0 +1,68 @@ +package finalize + +import ( + "context" + "fmt" + + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + policyv1 "k8s.io/api/policy/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "sigs.k8s.io/controller-runtime/pkg/client" + + vmv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" + vmv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" +) + +// OnVMDistributedClusterDelete removes all objects related to vmdistributedcluster component +func OnVMDistributedClusterDelete(ctx context.Context, rclient client.Client, cr *vmv1alpha1.VMDistributedCluster) error { + ns := cr.GetNamespace() + objsToRemove := []client.Object{} + if len(cr.Spec.VMAgent.Name) > 0 && cr.Spec.VMAgent.Spec != nil { + vmAgentMeta := metav1.ObjectMeta{ + Namespace: ns, + Name: cr.Spec.VMAgent.Name, + } + objsToRemove = append(objsToRemove, &vmv1beta1.VMAgent{ObjectMeta: vmAgentMeta}) + } + if len(cr.Spec.VMAuth.Name) > 0 { + vmAuthLBMeta := metav1.ObjectMeta{ + Namespace: ns, + Name: cr.Spec.VMAuth.Name, + } + vmAuthLBPrefixedMeta := metav1.ObjectMeta{ + Namespace: ns, + Name: cr.PrefixedName(vmv1beta1.ClusterComponentBalancer), + } + objsToRemove = append(objsToRemove, &appsv1.Deployment{ObjectMeta: vmAuthLBPrefixedMeta}) + objsToRemove = append(objsToRemove, &corev1.Service{ObjectMeta: vmAuthLBMeta}) + objsToRemove = append(objsToRemove, &corev1.ServiceAccount{ObjectMeta: metav1.ObjectMeta{ + Name: cr.GetServiceAccountName(), + Namespace: ns, + }}) + objsToRemove = append(objsToRemove, &corev1.Secret{ObjectMeta: vmAuthLBPrefixedMeta}) + objsToRemove = append(objsToRemove, &vmv1beta1.VMServiceScrape{ObjectMeta: vmAuthLBMeta}) + objsToRemove = append(objsToRemove, &policyv1.PodDisruptionBudget{ObjectMeta: vmAuthLBPrefixedMeta}) + } + for _, vmclusterSpec := range cr.Spec.Zones.VMClusters { + // Don't attempt to delete referenced or plain invalid clusters + if vmclusterSpec.Ref != nil || len(vmclusterSpec.Name) == 0 { + continue + } + vmcluster := &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: vmclusterSpec.Name, + Namespace: cr.Namespace, + }, + } + objsToRemove = append(objsToRemove, vmcluster) + } + owner := cr.AsOwner() + for _, objToRemove := range objsToRemove { + if err := SafeDeleteWithFinalizer(ctx, rclient, objToRemove, &owner); err != nil { + return fmt.Errorf("failed to remove object=%s: %w", objToRemove.GetObjectKind().GroupVersionKind(), err) + } + } + // Remove the CR + return removeFinalizeObjByName(ctx, rclient, cr, cr.Name, cr.Namespace) +} diff --git a/internal/controller/operator/factory/vmdistributedcluster/vmagent.go b/internal/controller/operator/factory/vmdistributedcluster/vmagent.go new file mode 100644 index 000000000..c18fe75a6 --- /dev/null +++ b/internal/controller/operator/factory/vmdistributedcluster/vmagent.go @@ -0,0 +1,298 @@ +package vmdistributedcluster + +import ( + "context" + "fmt" + "io" + "net/http" + "net/url" + "reflect" + "strconv" + "strings" + "time" + + discoveryv1 "k8s.io/api/discovery/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/wait" + "sigs.k8s.io/controller-runtime/pkg/client" + + vmv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" + vmv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" +) + +const ( + VMAgentQueueMetricName = "vm_persistentqueue_bytes_pending" +) + +// VMAgentMetrics defines the interface for VMAgent objects that can provide metrics URLs +type VMAgentMetrics interface { + AsURL() string + GetMetricPath() string +} + +// VMAgentWithStatus extends VMAgentMetrics to include status checking +type VMAgentWithStatus interface { + VMAgentMetrics + PrefixedName() string + GetName() string + GetNamespace() string +} + +// parseEndpointSliceAddresses extracts IPv4/IPv6 addresses from an EndpointSlice object. +func parseEndpointSliceAddresses(es *discoveryv1.EndpointSlice) []string { + if es == nil { + return nil + } + addrs := make([]string, 0) + for _, ep := range es.Endpoints { + for _, a := range ep.Addresses { + if a != "" { + addrs = append(addrs, a) + } + } + } + return addrs +} + +// buildPerIPMetricURL constructs a per-IP metrics URL using the base service URL to +// infer scheme and (optionally) port. This centralizes scheme/port detection so the +// polling logic remains concise. +func buildPerIPMetricURL(baseURL, metricPath, ip string) string { + scheme := "http" + port := "" + if u, err := url.Parse(baseURL); err == nil { + if u.Scheme != "" { + scheme = u.Scheme + } + if p := u.Port(); p != "" { + port = p + } + } + if port == "" { + // Default VMAgent metrics port + port = "8429" + } + return fmt.Sprintf("%s://%s:%s%s", scheme, ip, port, metricPath) +} + +// waitForVMClusterVMAgentMetrics accepts a VMAgentWithStatus interface plus a client.Client. +// This allows callers that already have an implementation of VMAgentWithStatus (e.g., tests' mocks) +// to call this function directly. Callers with a concrete *vmv1beta1.VMAgent can pass it directly +// since it implements the required methods. +// +// The function will try to discover pod IPs via an EndpointSlice named the same as the service +// (prefixed name). If discovery yields addresses, it polls each IP. Otherwise, it falls back to the +// single AsURL()+GetMetricPath() behavior. +func waitForVMClusterVMAgentMetrics(ctx context.Context, httpClient *http.Client, vmAgent VMAgentWithStatus, deadline time.Duration, rclient client.Client) error { + // Wait for vmAgent to become ready + err := wait.PollUntilContextTimeout(ctx, 5*time.Second, deadline, true, func(ctx context.Context) (done bool, err error) { + vmAgentObj := &vmv1beta1.VMAgent{} + namespacedName := types.NamespacedName{Name: vmAgent.GetName(), Namespace: vmAgent.GetNamespace()} + err = rclient.Get(ctx, namespacedName, vmAgentObj) + if err != nil { + return false, err + } + return vmAgentObj.Status.UpdateStatus == vmv1beta1.UpdateStatusOperational, nil + }) + if err != nil { + return err + } + + // Base values for fallback URL + baseURL := vmAgent.AsURL() + metricPath := vmAgent.GetMetricPath() + + var hosts []string + // Poll until pod IPs are discovered + err = wait.PollUntilContextTimeout(ctx, 1*time.Second, deadline, true, func(ctx context.Context) (done bool, err error) { + endpointList := &discoveryv1.EndpointSliceList{} + if err := rclient.List(ctx, endpointList, &client.ListOptions{ + LabelSelector: labels.SelectorFromSet(labels.Set{"kubernetes.io/service-name": vmAgent.PrefixedName()}), + }); err != nil { + return false, err + } + if len(endpointList.Items) == 0 { + return false, nil + } + hosts = parseEndpointSliceAddresses(&endpointList.Items[0]) + return len(hosts) > 0, nil + }) + if err != nil { + return err + } + + // Poll until all pod IPs return empty query metric + err = wait.PollUntilContextTimeout(ctx, 1*time.Second, deadline, true, func(ctx context.Context) (done bool, err error) { + // Query each discovered ip. If any returns non-zero metric, continue polling. + for _, ip := range hosts { + metricsURL := buildPerIPMetricURL(baseURL, metricPath, ip) + metricValue, ferr := fetchVMAgentDiskBufferMetric(ctx, httpClient, metricsURL) + if ferr != nil { + // Treat fetch errors as transient -> not ready, continue polling. + return false, nil + } + if metricValue != 0 { + return false, nil + } + } + // All discovered addresses reported zero -> done. + return true, nil + }) + if err != nil { + return fmt.Errorf("failed to wait for VMAgent metrics: %w", err) + } + return nil +} + +func fetchVMAgentDiskBufferMetric(ctx context.Context, httpClient *http.Client, metricsPath string) (int64, error) { + request, err := http.NewRequestWithContext(ctx, http.MethodGet, metricsPath, nil) + if err != nil { + return 0, fmt.Errorf("failed to create request for VMAgent at %s: %w", metricsPath, err) + } + resp, err := httpClient.Do(request) + if err != nil { + return 0, fmt.Errorf("failed to fetch metrics from VMAgent at %s: %w", metricsPath, err) + } + defer resp.Body.Close() + metricBytes, err := io.ReadAll(resp.Body) + if err != nil { + return 0, fmt.Errorf("failed to read VMAgent metrics at %s: %w", metricsPath, err) + } + metrics := string(metricBytes) + for _, metric := range strings.Split(metrics, "\n") { + value, found := strings.CutPrefix(metric, VMAgentQueueMetricName) + if found { + value = strings.Trim(value, " ") + res, err := strconv.ParseFloat(value, 64) + if err != nil { + return 0, fmt.Errorf("could not parse metric value %s: %w", metric, err) + } + return int64(res), nil + } + } + return 0, fmt.Errorf("metric %s not found", VMAgentQueueMetricName) +} + +// updateOrCreateVMAgent ensures that the VMAgent is updated or created based on the provided VMDistributedCluster. +func updateOrCreateVMAgent(ctx context.Context, rclient client.Client, cr *vmv1alpha1.VMDistributedCluster, scheme *runtime.Scheme, vmClusters []*vmv1beta1.VMCluster) (*vmv1beta1.VMAgent, error) { + // Get existing vmagent obj using Name and cr namespace + vmAgentExists := true + vmAgentNeedsUpdate := false + vmAgentObj := &vmv1beta1.VMAgent{} + namespacedName := types.NamespacedName{Name: cr.Spec.VMAgent.Name, Namespace: cr.Namespace} + if err := rclient.Get(ctx, namespacedName, vmAgentObj); err != nil { + if k8serrors.IsNotFound(err) { + vmAgentExists = false + // If it doesn't exist, initialize object for creation. + vmAgentObj = &vmv1beta1.VMAgent{ + ObjectMeta: metav1.ObjectMeta{ + Name: cr.Spec.VMAgent.Name, + Namespace: cr.Namespace, + }, + } + } else { + return nil, fmt.Errorf("failed to get VMAgent %s/%s: %w", cr.Namespace, cr.Spec.VMAgent.Name, err) + } + } + + // Prepare the desired spec for VMAgent. + desiredVMAgentSpec := vmv1alpha1.CustomVMAgentSpec{} + if cr.Spec.VMAgent.Spec != nil { + desiredVMAgentSpec = *cr.Spec.VMAgent.Spec.DeepCopy() + } + + // Determine tenant id (default to "0" when not provided) + tenantID := "0" + if cr.Spec.VMAgent.TenantID != nil && *cr.Spec.VMAgent.TenantID != "" { + tenantID = *cr.Spec.VMAgent.TenantID + } + + tenantPtr := &tenantID + + // Point VMAgent to all VMClusters by constructing RemoteWrite entries + if len(vmClusters) > 0 { + desiredVMAgentSpec.RemoteWrite = make([]vmv1alpha1.CustomVMAgentRemoteWriteSpec, len(vmClusters)) + for i, vmCluster := range vmClusters { + desiredVMAgentSpec.RemoteWrite[i].URL = remoteWriteURL(vmCluster, tenantPtr) + } + } + + // Assemble new VMAgentSpec + newVMAgentSpec := vmv1beta1.VMAgentSpec{} + newVMAgentSpec.PodMetadata = desiredVMAgentSpec.PodMetadata + newVMAgentSpec.ManagedMetadata = desiredVMAgentSpec.ManagedMetadata + newVMAgentSpec.LogLevel = desiredVMAgentSpec.LogLevel + newVMAgentSpec.LogFormat = desiredVMAgentSpec.LogFormat + newVMAgentSpec.RemoteWriteSettings = desiredVMAgentSpec.RemoteWriteSettings + newVMAgentSpec.ShardCount = desiredVMAgentSpec.ShardCount + newVMAgentSpec.UpdateStrategy = desiredVMAgentSpec.UpdateStrategy + newVMAgentSpec.RollingUpdate = desiredVMAgentSpec.RollingUpdate + newVMAgentSpec.PodDisruptionBudget = desiredVMAgentSpec.PodDisruptionBudget + newVMAgentSpec.EmbeddedProbes = desiredVMAgentSpec.EmbeddedProbes + newVMAgentSpec.DaemonSetMode = desiredVMAgentSpec.DaemonSetMode + newVMAgentSpec.StatefulMode = desiredVMAgentSpec.StatefulMode + newVMAgentSpec.StatefulStorage = desiredVMAgentSpec.StatefulStorage + newVMAgentSpec.StatefulRollingUpdateStrategy = desiredVMAgentSpec.StatefulRollingUpdateStrategy + newVMAgentSpec.PersistentVolumeClaimRetentionPolicy = desiredVMAgentSpec.PersistentVolumeClaimRetentionPolicy + newVMAgentSpec.ClaimTemplates = desiredVMAgentSpec.ClaimTemplates + newVMAgentSpec.License = desiredVMAgentSpec.License + newVMAgentSpec.ServiceAccountName = desiredVMAgentSpec.ServiceAccountName + newVMAgentSpec.VMAgentSecurityEnforcements = desiredVMAgentSpec.VMAgentSecurityEnforcements + newVMAgentSpec.CommonDefaultableParams = desiredVMAgentSpec.CommonDefaultableParams + newVMAgentSpec.CommonConfigReloaderParams = desiredVMAgentSpec.CommonConfigReloaderParams + newVMAgentSpec.CommonApplicationDeploymentParams = desiredVMAgentSpec.CommonApplicationDeploymentParams + + if len(desiredVMAgentSpec.RemoteWrite) > 0 { + newVMAgentSpec.RemoteWrite = make([]vmv1beta1.VMAgentRemoteWriteSpec, len(desiredVMAgentSpec.RemoteWrite)) + for i, remoteWrite := range desiredVMAgentSpec.RemoteWrite { + vmAgentRemoteWrite := vmv1beta1.VMAgentRemoteWriteSpec{} + vmAgentRemoteWrite.URL = remoteWrite.URL + vmAgentRemoteWrite.BasicAuth = remoteWrite.BasicAuth + vmAgentRemoteWrite.BearerTokenSecret = remoteWrite.BearerTokenSecret + vmAgentRemoteWrite.OAuth2 = remoteWrite.OAuth2 + vmAgentRemoteWrite.TLSConfig = remoteWrite.TLSConfig + vmAgentRemoteWrite.SendTimeout = remoteWrite.SendTimeout + vmAgentRemoteWrite.Headers = remoteWrite.Headers + vmAgentRemoteWrite.MaxDiskUsage = remoteWrite.MaxDiskUsage + vmAgentRemoteWrite.ForceVMProto = remoteWrite.ForceVMProto + vmAgentRemoteWrite.ProxyURL = remoteWrite.ProxyURL + vmAgentRemoteWrite.AWS = remoteWrite.AWS + newVMAgentSpec.RemoteWrite[i] = vmAgentRemoteWrite + } + } + + // Compare current spec with desired spec and apply if different + if !reflect.DeepEqual(vmAgentObj.Spec, newVMAgentSpec) { + vmAgentObj.Spec = *newVMAgentSpec.DeepCopy() + vmAgentNeedsUpdate = true + } + + // Ensure owner reference is set to current CR + if modifiedOwnerRef, err := setOwnerRefIfNeeded(cr, vmAgentObj, scheme); err != nil { + // setOwnerRefIfNeeded already returns wrapped error + return nil, fmt.Errorf("failed to set owner reference for VMAgent %s: %w", vmAgentObj.Name, err) + } else if modifiedOwnerRef { + vmAgentNeedsUpdate = true + } + + // Create or update the vmagent object if spec has changed or it doesn't exist yet + if !vmAgentExists { + if err := rclient.Create(ctx, vmAgentObj); err != nil { + return nil, fmt.Errorf("failed to create VMAgent %s/%s: %w", vmAgentObj.Namespace, vmAgentObj.Name, err) + } + } else if vmAgentNeedsUpdate { + if err := rclient.Update(ctx, vmAgentObj); err != nil { + return nil, fmt.Errorf("failed to update VMAgent %s/%s: %w", vmAgentObj.Namespace, vmAgentObj.Name, err) + } + } + return vmAgentObj, nil +} + +// remoteWriteURL generates the remote write URL based on the provided VMCluster and tenant. +func remoteWriteURL(vmCluster *vmv1beta1.VMCluster, tenant *string) string { + return fmt.Sprintf("http://%s.%s.svc.cluster.local.:8480/insert/%s/prometheus/api/v1/write", vmCluster.PrefixedName(vmv1beta1.ClusterComponentInsert), vmCluster.Namespace, *tenant) +} diff --git a/internal/controller/operator/factory/vmdistributedcluster/vmagent_test.go b/internal/controller/operator/factory/vmdistributedcluster/vmagent_test.go new file mode 100644 index 000000000..6172aaa2d --- /dev/null +++ b/internal/controller/operator/factory/vmdistributedcluster/vmagent_test.go @@ -0,0 +1,173 @@ +package vmdistributedcluster + +import ( + "context" + "fmt" + "net/http" + "net/http/httptest" + "net/url" + "testing" + "time" + + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + discoveryv1 "k8s.io/api/discovery/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + fake "sigs.k8s.io/controller-runtime/pkg/client/fake" + + vmv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" + vmv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" +) + +// mockVMAgent is a small test double implementing the minimal interface expected by +// waitForVMClusterVMAgentMetrics (VMAgentWithStatus/VMAgentMetrics). +type mockVMAgent struct { + url string + replicas int32 +} + +func (m *mockVMAgent) AsURL() string { + return m.url +} +func (m *mockVMAgent) GetMetricPath() string { + return "" +} +func (m *mockVMAgent) GetReplicas() int32 { + return m.replicas +} +func (m *mockVMAgent) GetNamespace() string { + return "default" +} +func (m *mockVMAgent) GetName() string { + return "test-vmagent" +} +func (m *mockVMAgent) PrefixedName() string { + // Mirror concrete VMAgent.PrefixedName behaviour for tests: + // concrete uses the format "vmagent-%s". + return "vmagent-test-vmagent" +} + +// newVMAgentMetricsHandler creates an httptest.Server that serves the provided handler +// and a fake client seeded with a VMAgent and an EndpointSlice that points to the test server. +// It returns the server, the mock VMAgent and the client. +func newVMAgentMetricsHandler(t *testing.T, handler http.Handler) (*httptest.Server, *mockVMAgent, client.Client) { + scheme := runtime.NewScheme() + _ = vmv1alpha1.AddToScheme(scheme) + _ = vmv1beta1.AddToScheme(scheme) + _ = corev1.AddToScheme(scheme) + _ = discoveryv1.AddToScheme(scheme) + + ts := httptest.NewServer(handler) + + // ts.URL contains the URL of the test server + // we need to ensure endpoint will be set to its host and vmAgent URL will use the same port + mockVMAgent := &mockVMAgent{url: ts.URL, replicas: 1} + tsURL, err := url.Parse(ts.URL) + assert.NoError(t, err) + + vmAgent := vmv1beta1.VMAgent{ + ObjectMeta: metav1.ObjectMeta{ + Name: mockVMAgent.GetName(), + Namespace: mockVMAgent.GetNamespace(), + }, + Status: vmv1beta1.VMAgentStatus{ + StatusMetadata: vmv1beta1.StatusMetadata{ + UpdateStatus: vmv1beta1.UpdateStatusOperational, + }, + }, + } + endpointSlice := discoveryv1.EndpointSlice{ + ObjectMeta: metav1.ObjectMeta{ + Name: "random-endpoint-name", + Namespace: mockVMAgent.GetNamespace(), + Labels: map[string]string{"kubernetes.io/service-name": vmAgent.PrefixedName()}, + }, + Endpoints: []discoveryv1.Endpoint{ + { + Addresses: []string{tsURL.Hostname()}, + }, + }, + } + + initialObjects := []client.Object{} + initialObjects = append(initialObjects, &vmAgent) + initialObjects = append(initialObjects, &endpointSlice) + + fakeClient := fake.NewClientBuilder().WithScheme(scheme).WithObjects(initialObjects...).Build() + + return ts, mockVMAgent, fakeClient +} + +func TestWaitForVMClusterVMAgentMetrics(t *testing.T) { + t.Run("VMAgent metrics return zero", func(t *testing.T) { + + ts, mockVMAgent, trClient := newVMAgentMetricsHandler(t, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + fmt.Fprintln(w, "vm_persistentqueue_bytes_pending 0") + })) + defer ts.Close() + + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + + err := waitForVMClusterVMAgentMetrics(ctx, ts.Client(), mockVMAgent, time.Second, trClient) + assert.NoError(t, err) + }) + + t.Run("VMAgent metrics return non-zero then zero", func(t *testing.T) { + callCount := 0 + ts, mockVMAgent, trClient := newVMAgentMetricsHandler(t, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + callCount++ + if callCount == 1 { + fmt.Fprintln(w, "vm_persistentqueue_bytes_pending 100") + } else { + fmt.Fprintln(w, "vm_persistentqueue_bytes_pending 0") + } + })) + defer ts.Close() + + ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second) + defer cancel() + + err := waitForVMClusterVMAgentMetrics(ctx, ts.Client(), mockVMAgent, time.Second*2, trClient) + assert.NoError(t, err) + assert.True(t, callCount > 1) // Ensure it polled multiple times + }) + + t.Run("VMAgent metrics timeout", func(t *testing.T) { + ts, mockVMAgent, trClient := newVMAgentMetricsHandler(t, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + time.Sleep(2 * time.Second) // Simulate a long response + fmt.Fprintln(w, "vm_persistentqueue_bytes_pending 0") + })) + defer ts.Close() + + ctx, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + + err := waitForVMClusterVMAgentMetrics(ctx, ts.Client(), mockVMAgent, 500*time.Millisecond, trClient) // Shorter deadline + assert.Error(t, err) + assert.Contains(t, err.Error(), "failed to wait for VMAgent metrics") + }) +} + +// Unit tests for helper functions and adapter behavior +func TestVMAgentURLHelpers(t *testing.T) { + t.Run("buildPerIPMetricURL builds proper URL with scheme and port", func(t *testing.T) { + baseURL := "http://my-svc.default.svc:1234" + metricPath := "/metrics" + ip := "10.0.0.1" + got := buildPerIPMetricURL(baseURL, metricPath, ip) + expected := "http://10.0.0.1:1234/metrics" + assert.Equal(t, expected, got) + }) + + t.Run("buildPerIPMetricURL defaults port when not present", func(t *testing.T) { + baseURL := "http://my-svc.default.svc" + metricPath := "/metrics" + ip := "10.0.0.2" + got := buildPerIPMetricURL(baseURL, metricPath, ip) + expected := "http://10.0.0.2:8429/metrics" + assert.Equal(t, expected, got) + }) +} diff --git a/internal/controller/operator/factory/vmdistributedcluster/vmauth_config.go b/internal/controller/operator/factory/vmdistributedcluster/vmauth_config.go new file mode 100644 index 000000000..e4425680b --- /dev/null +++ b/internal/controller/operator/factory/vmdistributedcluster/vmauth_config.go @@ -0,0 +1,312 @@ +package vmdistributedcluster + +import ( + "context" + "fmt" + "sort" + + "gopkg.in/yaml.v2" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + policyv1 "k8s.io/api/policy/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/util/intstr" + "k8s.io/utils/ptr" + "sigs.k8s.io/controller-runtime/pkg/client" + + vmv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" + vmv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" + "github.com/VictoriaMetrics/operator/internal/config" + "github.com/VictoriaMetrics/operator/internal/controller/operator/factory/build" + "github.com/VictoriaMetrics/operator/internal/controller/operator/factory/k8stools" + "github.com/VictoriaMetrics/operator/internal/controller/operator/factory/reconcile" +) + +// VMAuthConfig is the top-level structure for vmauth configuration. +type VMAuthConfig struct { + UnauthorizedUser *VMAuthUser `yaml:"unauthorized_user,omitempty"` +} + +// VMAuthUser defines the user settings for vmauth. +type VMAuthUser struct { + URLMap []URLMap `yaml:"url_map"` +} + +// URLMap defines a single URL mapping rule. +type URLMap struct { + SrcPaths []string `yaml:"src_paths"` + URLPrefix string `yaml:"url_prefix"` + DiscoverBackendIPs bool `yaml:"discover_backend_ips"` +} + +// buildVMAuthVMSelectRefs builds the URLMap entries for each vmselect in the vmclusters. +func buildVMAuthVMSelectURLMaps(vmClusters []*vmv1beta1.VMCluster) []URLMap { + maps := make([]URLMap, 0, len(vmClusters)) + for _, vmCluster := range vmClusters { + targetHostSuffix := fmt.Sprintf("%s.svc", vmCluster.Namespace) + if vmCluster.Spec.ClusterDomainName != "" { + targetHostSuffix += fmt.Sprintf(".%s", vmCluster.Spec.ClusterDomainName) + } + selectPort := "8481" + if vmCluster.Spec.VMSelect != nil && vmCluster.Spec.VMSelect.Port != "" { + selectPort = vmCluster.Spec.VMSelect.Port + } + maps = append(maps, URLMap{ + SrcPaths: []string{"/.*"}, + URLPrefix: fmt.Sprintf("http://srv+%s.%s:%s", vmCluster.PrefixedName(vmv1beta1.ClusterComponentSelect), targetHostSuffix, selectPort), + DiscoverBackendIPs: true, + }) + } + return maps +} + +// buildVMAuthLBSecret builds a secret containing the vmauth configuration. +func buildVMAuthLBSecret(cr *vmv1alpha1.VMDistributedCluster, vmClusters []*vmv1beta1.VMCluster) (*corev1.Secret, error) { + config := VMAuthConfig{ + UnauthorizedUser: &VMAuthUser{ + URLMap: buildVMAuthVMSelectURLMaps(vmClusters), + }, + } + + configData, err := yaml.Marshal(config) + if err != nil { + return nil, fmt.Errorf("cannot marshal vmauth config: %w", err) + } + + lbScrt := &corev1.Secret{ + ObjectMeta: buildLBConfigMeta(cr), + StringData: map[string]string{"config.yaml": string(configData)}, + } + return lbScrt, nil +} + +func buildLBConfigMeta(cr *vmv1alpha1.VMDistributedCluster) metav1.ObjectMeta { + return metav1.ObjectMeta{ + Namespace: cr.Namespace, + Name: cr.PrefixedName(vmv1beta1.ClusterComponentBalancer), + Labels: cr.FinalLabels(vmv1beta1.ClusterComponentBalancer), + Annotations: cr.AnnotationsFiltered(), + OwnerReferences: []metav1.OwnerReference{cr.AsOwner()}, + } +} + +func buildVMAuthLBDeployment(cr *vmv1alpha1.VMDistributedCluster) (*appsv1.Deployment, error) { + spec := cr.GetVMAuthSpec() + const configMountName = "vmauth-lb-config" + volumes := []corev1.Volume{ + { + Name: configMountName, + VolumeSource: corev1.VolumeSource{ + Secret: &corev1.SecretVolumeSource{ + SecretName: cr.PrefixedName(vmv1beta1.ClusterComponentBalancer), + }, + }, + }, + } + volumes = append(volumes, spec.Volumes...) + vmounts := []corev1.VolumeMount{ + { + MountPath: "/opt/vmauth-config/", + Name: configMountName, + }, + } + vmounts = append(vmounts, spec.VolumeMounts...) + + args := []string{ + "-auth.config=/opt/vmauth-config/config.yaml", + "-configCheckInterval=30s", + } + if spec.LogLevel != "" { + args = append(args, fmt.Sprintf("-loggerLevel=%s", spec.LogLevel)) + + } + if spec.LogFormat != "" { + args = append(args, fmt.Sprintf("-loggerFormat=%s", spec.LogFormat)) + } + + cfg := config.MustGetBaseConfig() + args = append(args, fmt.Sprintf("-httpListenAddr=:%s", spec.Port)) + if cfg.EnableTCP6 { + args = append(args, "-enableTCP6") + } + if len(spec.ExtraEnvs) > 0 || len(spec.ExtraEnvsFrom) > 0 { + args = append(args, "-envflag.enable=true") + } + + args = build.AddExtraArgsOverrideDefaults(args, spec.ExtraArgs, "-") + sort.Strings(args) + vmauthLBCnt := corev1.Container{ + Name: "vmauth", + Ports: []corev1.ContainerPort{ + { + Protocol: corev1.ProtocolTCP, + Name: "http", + ContainerPort: intstr.Parse(spec.Port).IntVal, + }, + }, + Args: args, + Env: spec.ExtraEnvs, + EnvFrom: spec.ExtraEnvsFrom, + Resources: spec.Resources, + Image: fmt.Sprintf("%s:%s", spec.Image.Repository, spec.Image.Tag), + ImagePullPolicy: spec.Image.PullPolicy, + VolumeMounts: vmounts, + } + vmauthLBCnt = build.Probe(vmauthLBCnt, spec) + containers := []corev1.Container{ + vmauthLBCnt, + } + var err error + + build.AddStrictSecuritySettingsToContainers(spec.SecurityContext, containers, ptr.Deref(spec.UseStrictSecurity, cfg.EnableStrictSecurity)) + containers, err = k8stools.MergePatchContainers(containers, spec.Containers) + if err != nil { + return nil, fmt.Errorf("cannot patch containers: %w", err) + } + strategyType := appsv1.RollingUpdateDeploymentStrategyType + if spec.UpdateStrategy != nil { + strategyType = *spec.UpdateStrategy + } + lbDep := &appsv1.Deployment{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: cr.Namespace, + Name: cr.PrefixedName(vmv1beta1.ClusterComponentBalancer), + Labels: cr.FinalLabels(vmv1beta1.ClusterComponentBalancer), + Annotations: cr.AnnotationsFiltered(), + OwnerReferences: []metav1.OwnerReference{cr.AsOwner()}, + }, + Spec: appsv1.DeploymentSpec{ + Selector: &metav1.LabelSelector{ + MatchLabels: cr.SelectorLabels(vmv1beta1.ClusterComponentBalancer), + }, + Strategy: appsv1.DeploymentStrategy{ + Type: strategyType, + RollingUpdate: spec.RollingUpdate, + }, + Template: corev1.PodTemplateSpec{ + ObjectMeta: metav1.ObjectMeta{ + Labels: cr.PodLabels(vmv1beta1.ClusterComponentBalancer), + Annotations: cr.PodAnnotations(vmv1beta1.ClusterComponentBalancer), + }, + Spec: corev1.PodSpec{ + Volumes: volumes, + InitContainers: spec.InitContainers, + Containers: containers, + ServiceAccountName: cr.GetServiceAccountName(), + }, + }, + }, + } + build.DeploymentAddCommonParams(lbDep, ptr.Deref(spec.UseStrictSecurity, cfg.EnableStrictSecurity), &spec.CommonApplicationDeploymentParams) + return lbDep, nil +} + +func createOrUpdateVMAuthLBService(ctx context.Context, rclient client.Client, cr, prevCR *vmv1alpha1.VMDistributedCluster) error { + spec := cr.GetVMAuthSpec() + + builder := func(r *vmv1alpha1.VMDistributedCluster) *build.ChildBuilder { + b := build.NewChildBuilder(r, vmv1beta1.ClusterComponentBalancer) + b.SetFinalLabels(labels.Merge(b.FinalLabels(), map[string]string{ + vmv1beta1.VMAuthLBServiceProxyTargetLabel: "vmauth", + })) + return b + } + b := builder(cr) + svc := build.Service(b, spec.Port, nil) + // Set custom name + svc.Name = cr.Spec.VMAuth.Name + + var prevSvc *corev1.Service + if prevCR != nil { + b = builder(prevCR) + prevSvc = build.Service(b, prevCR.Spec.VMAuth.Spec.Port, nil) + } + + if err := reconcile.Service(ctx, rclient, svc, prevSvc); err != nil { + return fmt.Errorf("cannot reconcile vmauthlb service: %w", err) + } + svs := build.VMServiceScrapeForServiceWithSpec(svc, spec) + svs.Spec.Selector.MatchLabels[vmv1beta1.VMAuthLBServiceProxyTargetLabel] = "vmauth" + if err := reconcile.VMServiceScrapeForCRD(ctx, rclient, svs); err != nil { + return fmt.Errorf("cannot reconcile vmauthlb vmservicescrape: %w", err) + } + return nil +} + +func createOrUpdatePodDisruptionBudgetForVMAuthLB(ctx context.Context, rclient client.Client, cr, prevCR *vmv1alpha1.VMDistributedCluster) error { + spec := cr.GetVMAuthSpec() + + b := build.NewChildBuilder(cr, vmv1beta1.ClusterComponentBalancer) + pdb := build.PodDisruptionBudget(b, spec.PodDisruptionBudget) + var prevPDB *policyv1.PodDisruptionBudget + if prevCR != nil && prevCR.Spec.VMAuth.Spec.PodDisruptionBudget != nil { + b = build.NewChildBuilder(prevCR, vmv1beta1.ClusterComponentBalancer) + prevPDB = build.PodDisruptionBudget(b, prevCR.Spec.VMAuth.Spec.PodDisruptionBudget) + } + return reconcile.PDB(ctx, rclient, pdb, prevPDB) +} + +func updateVMAuthLBSecret(ctx context.Context, rclient client.Client, cr, prevCR *vmv1alpha1.VMDistributedCluster, vmClusters []*vmv1beta1.VMCluster) error { + var prevSecretMeta *metav1.ObjectMeta + if prevCR != nil { + prevSecretMeta = ptr.To(buildLBConfigMeta(prevCR)) + } + + secret, err := buildVMAuthLBSecret(cr, vmClusters) + if err != nil { + return fmt.Errorf("cannot build vmauth lb secret: %w", err) + } + if err := reconcile.Secret(ctx, rclient, secret, prevSecretMeta); err != nil { + return fmt.Errorf("cannot reconcile vmauth lb secret: %w", err) + } + return nil +} + +func createOrUpdateVMAuthLB(ctx context.Context, rclient client.Client, cr, prevCR *vmv1alpha1.VMDistributedCluster, vmClusters []*vmv1beta1.VMCluster) error { + spec := cr.GetVMAuthSpec() + + updateVMAuthLBSecret(ctx, rclient, cr, prevCR, vmClusters) + + serviceAccount := &corev1.ServiceAccount{ + ObjectMeta: metav1.ObjectMeta{ + Name: cr.GetServiceAccountName(), + Namespace: cr.GetNamespace(), + Labels: cr.AllLabels(), + Annotations: cr.AnnotationsFiltered(), + OwnerReferences: []metav1.OwnerReference{cr.AsOwner()}, + }, + } + var prevSA *corev1.ServiceAccount + if prevCR != nil { + prevSA = serviceAccount.DeepCopy() + } + + if err := reconcile.ServiceAccount(ctx, rclient, serviceAccount, prevSA); err != nil { + return fmt.Errorf("failed create service account: %w", err) + } + + lbDep, err := buildVMAuthLBDeployment(cr) + if err != nil { + return fmt.Errorf("cannot build deployment for vmauth loadbalancing: %w", err) + } + var prevLB *appsv1.Deployment + if prevCR != nil { + prevLB, err = buildVMAuthLBDeployment(prevCR) + if err != nil { + return fmt.Errorf("cannot build prev deployment for vmauth loadbalancing: %w", err) + } + } + if err := reconcile.Deployment(ctx, rclient, lbDep, prevLB, false); err != nil { + return fmt.Errorf("cannot reconcile vmauth lb deployment: %w", err) + } + if err := createOrUpdateVMAuthLBService(ctx, rclient, cr, prevCR); err != nil { + return err + } + if spec.PodDisruptionBudget != nil { + if err := createOrUpdatePodDisruptionBudgetForVMAuthLB(ctx, rclient, cr, prevCR); err != nil { + return fmt.Errorf("cannot create or update PodDisruptionBudget for vmauth lb: %w", err) + } + } + return nil +} diff --git a/internal/controller/operator/factory/vmdistributedcluster/vmauth_config_test.go b/internal/controller/operator/factory/vmdistributedcluster/vmauth_config_test.go new file mode 100644 index 000000000..2e686d473 --- /dev/null +++ b/internal/controller/operator/factory/vmdistributedcluster/vmauth_config_test.go @@ -0,0 +1,182 @@ +package vmdistributedcluster + +import ( + "testing" + + "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + vmv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" + vmv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" +) + +func Test_buildVMAuthVMSelectURLMaps(t *testing.T) { + type args struct { + vmClusters []*vmv1beta1.VMCluster + } + tests := []struct { + name string + args args + want []URLMap + }{ + { + name: "single default vmcluster", + args: args{ + vmClusters: []*vmv1beta1.VMCluster{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "vmc-test", + Namespace: "default", + }, + Spec: vmv1beta1.VMClusterSpec{}, + }, + }, + }, + want: []URLMap{ + { + SrcPaths: []string{"/.*"}, + URLPrefix: "http://srv+vmselect-vmc-test.default.svc:8481", + DiscoverBackendIPs: true, + }, + }, + }, + + { + name: "multiple vmclusters", + args: args{ + vmClusters: []*vmv1beta1.VMCluster{ + { + ObjectMeta: metav1.ObjectMeta{Name: "vmc-1", Namespace: "ns1"}, + Spec: vmv1beta1.VMClusterSpec{}, + }, + { + ObjectMeta: metav1.ObjectMeta{Name: "vmc-2", Namespace: "ns2"}, + Spec: vmv1beta1.VMClusterSpec{ + VMSelect: &vmv1beta1.VMSelect{}, + }, + }, + }, + }, + want: []URLMap{ + { + SrcPaths: []string{"/.*"}, + URLPrefix: "http://srv+vmselect-vmc-1.ns1.svc:8481", + DiscoverBackendIPs: true, + }, + { + SrcPaths: []string{"/.*"}, + URLPrefix: "http://srv+vmselect-vmc-2.ns2.svc:8481", + DiscoverBackendIPs: true, + }, + }, + }, + { + name: "no vmclusters", + args: args{ + vmClusters: []*vmv1beta1.VMCluster{}, + }, + want: []URLMap{}, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := buildVMAuthVMSelectURLMaps(tt.args.vmClusters) + assert.Equal(t, tt.want, got) + }) + } +} + +func Test_buildVMAuthLBSecret(t *testing.T) { + cr := &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: "vmdist", + Namespace: "prod", + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + VMAuth: vmv1alpha1.VMAuthNameAndSpec{ + Name: "vmauth", + Spec: &vmv1beta1.VMAuthLoadBalancerSpec{}, + }, + }, + } + vmClusters := []*vmv1beta1.VMCluster{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "vmc-test", + Namespace: "default", + }, + Spec: vmv1beta1.VMClusterSpec{}, + }, + } + + secret, err := buildVMAuthLBSecret(cr, vmClusters) + assert.NoError(t, err) + assert.NotNil(t, secret) + + assert.Equal(t, "vmdclusterlb-vmdist", secret.Name) + assert.Equal(t, "prod", secret.Namespace) + + configData, ok := secret.StringData["config.yaml"] + assert.True(t, ok) + assert.NotEmpty(t, configData) + + expectedYAML := `unauthorized_user: + url_map: + - src_paths: + - /.* + url_prefix: http://srv+vmselect-vmc-test.default.svc:8481 + discover_backend_ips: true +` + assert.Equal(t, expectedYAML, configData) + + t.Run("multiple vmclusters", func(t *testing.T) { + vmClusters := []*vmv1beta1.VMCluster{ + { + ObjectMeta: metav1.ObjectMeta{ + Name: "vmc-test-1", + Namespace: "default", + }, + Spec: vmv1beta1.VMClusterSpec{}, + }, + { + ObjectMeta: metav1.ObjectMeta{ + Name: "vmc-test-2", + Namespace: "monitoring", + }, + Spec: vmv1beta1.VMClusterSpec{}, + }, + } + secret, err := buildVMAuthLBSecret(cr, vmClusters) + assert.NoError(t, err) + assert.NotNil(t, secret) + + configData, ok := secret.StringData["config.yaml"] + assert.True(t, ok) + expectedYAML := `unauthorized_user: + url_map: + - src_paths: + - /.* + url_prefix: http://srv+vmselect-vmc-test-1.default.svc:8481 + discover_backend_ips: true + - src_paths: + - /.* + url_prefix: http://srv+vmselect-vmc-test-2.monitoring.svc:8481 + discover_backend_ips: true +` + assert.Equal(t, expectedYAML, configData) + }) + + // Test with no vmclusters + t.Run("no vmclusters", func(t *testing.T) { + secret, err := buildVMAuthLBSecret(cr, []*vmv1beta1.VMCluster{}) + assert.NoError(t, err) + assert.NotNil(t, secret) + + configData, ok := secret.StringData["config.yaml"] + assert.True(t, ok) + expectedYAML := `unauthorized_user: + url_map: [] +` + assert.Equal(t, expectedYAML, configData) + }) +} diff --git a/internal/controller/operator/factory/vmdistributedcluster/vmcluster.go b/internal/controller/operator/factory/vmdistributedcluster/vmcluster.go new file mode 100644 index 000000000..5cb61bb3a --- /dev/null +++ b/internal/controller/operator/factory/vmdistributedcluster/vmcluster.go @@ -0,0 +1,267 @@ +package vmdistributedcluster + +import ( + "context" + "encoding/json" + "fmt" + "reflect" + "sort" + "time" + + corev1 "k8s.io/api/core/v1" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/util/wait" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil" + + vmv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" + vmv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" +) + +// validateVMClusterRefOrSpec checks for mutual exclusivity and required fields for VMClusterRefOrSpec. +func validateVMClusterRefOrSpec(i int, refOrSpec vmv1alpha1.VMClusterRefOrSpec) error { + if refOrSpec.Spec != nil && refOrSpec.Ref != nil { + return fmt.Errorf("VMClusterRefOrSpec at index %d must specify either Ref or Spec, got: %+v", i, refOrSpec) + } + if refOrSpec.Spec == nil && refOrSpec.Ref == nil { + return fmt.Errorf("VMClusterRefOrSpec at index %d must have either Ref or Spec set, got: %+v", i, refOrSpec) + } + if refOrSpec.Spec != nil && refOrSpec.OverrideSpec != nil { + return fmt.Errorf("VMClusterRefOrSpec at index %d cannot have both Spec and OverrideSpec set, got: %+v", i, refOrSpec) + } + if refOrSpec.Spec != nil && refOrSpec.Name == "" { + return fmt.Errorf("VMClusterRefOrSpec.Name must be set when Spec is provided for index %d", i) + } + if refOrSpec.Ref != nil && refOrSpec.Ref.Name == "" { + return fmt.Errorf("VMClusterRefOrSpec.Ref.Name must be set for reference at index %d", i) + } + return nil +} + +// getReferencedVMCluster fetches an existing VMCluster based on its reference. +func getReferencedVMCluster(ctx context.Context, rclient client.Client, namespace string, ref *corev1.LocalObjectReference) (*vmv1beta1.VMCluster, error) { + vmClusterObj := &vmv1beta1.VMCluster{} + namespacedName := types.NamespacedName{Name: ref.Name, Namespace: namespace} + if err := rclient.Get(ctx, namespacedName, vmClusterObj); err != nil { + if k8serrors.IsNotFound(err) { + return nil, fmt.Errorf("referenced VMCluster %s/%s not found: %w", namespace, ref.Name, err) + } + return nil, fmt.Errorf("failed to get referenced VMCluster %s/%s: %w", namespace, ref.Name, err) + } + return vmClusterObj, nil +} + +// fetchVMClusters ensures that referenced VMClusters are fetched and validated. +func fetchVMClusters(ctx context.Context, rclient client.Client, namespace string, refs []vmv1alpha1.VMClusterRefOrSpec) ([]*vmv1beta1.VMCluster, error) { + var err error + vmClusters := make([]*vmv1beta1.VMCluster, len(refs)) + for i, vmClusterObjOrRef := range refs { + if err = validateVMClusterRefOrSpec(i, vmClusterObjOrRef); err != nil { + return nil, err + } + + switch { + case vmClusterObjOrRef.Ref != nil: + vmClusters[i], err = getReferencedVMCluster(ctx, rclient, namespace, vmClusterObjOrRef.Ref) + if err != nil { + return nil, fmt.Errorf("failed to fetch vmclusters: %w", err) + } + case vmClusterObjOrRef.Spec != nil: + // Create an in-memory VMCluster object, it will be reconciled in the main loop. + vmClusters[i] = &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: vmClusterObjOrRef.Name, + Namespace: namespace, + }, + Spec: *vmClusterObjOrRef.Spec.DeepCopy(), + } + // We try to fetch the object to get the current state (Generation, etc) + if err := rclient.Get(ctx, types.NamespacedName{Name: vmClusterObjOrRef.Name, Namespace: namespace}, vmClusters[i]); err != nil { + if !k8serrors.IsNotFound(err) { + return nil, fmt.Errorf("failed to fetch vmcluster %s: %w", vmClusterObjOrRef.Name, err) + } + } + default: + return nil, fmt.Errorf("invalid VMClusterRefOrSpec at index %d: neither Ref nor Spec is set", i) + } + } + + // Sort VMClusters by observedGeneration in descending order (biggest first) + sort.Slice(vmClusters, func(i, j int) bool { + return vmClusters[i].Status.ObservedGeneration > vmClusters[j].Status.ObservedGeneration + }) + + return vmClusters, nil +} + +// ApplyOverrideSpec merges an override VMClusterSpec into a base VMClusterSpec. +// Fields present in the overrideSpec (and not nil) will overwrite corresponding fields in the baseSpec. +func ApplyOverrideSpec(baseSpec vmv1beta1.VMClusterSpec, overrideSpec *apiextensionsv1.JSON) (vmv1beta1.VMClusterSpec, bool, error) { + if overrideSpec == nil || overrideSpec.Raw == nil || len(overrideSpec.Raw) == 0 { + return baseSpec, false, nil + } + + baseSpecJSON, err := json.Marshal(baseSpec) + if err != nil { + return vmv1beta1.VMClusterSpec{}, false, fmt.Errorf("failed to marshal base VMClusterSpec: %w", err) + } + + var baseMap map[string]interface{} + if err := json.Unmarshal(baseSpecJSON, &baseMap); err != nil { + return vmv1beta1.VMClusterSpec{}, false, fmt.Errorf("failed to unmarshal base VMClusterSpec to map: %w", err) + } + var overrideMap map[string]interface{} + if err := json.Unmarshal(overrideSpec.Raw, &overrideMap); err != nil { + return vmv1beta1.VMClusterSpec{}, false, fmt.Errorf("failed to unmarshal override VMClusterSpec to map: %w", err) + } + + // Perform a deep merge: fields from overrideMap recursively overwrite corresponding fields in baseMap. + // If an override value is explicitly nil, it signifies the removal or nullification of that field. + modified := mergeMapsRecursive(baseMap, overrideMap) + + mergedSpecJSON, err := json.Marshal(baseMap) + if err != nil { + return vmv1beta1.VMClusterSpec{}, false, fmt.Errorf("failed to marshal merged VMClusterSpec map: %w", err) + } + + mergedSpec := vmv1beta1.VMClusterSpec{} + if err := json.Unmarshal(mergedSpecJSON, &mergedSpec); err != nil { + return vmv1beta1.VMClusterSpec{}, false, fmt.Errorf("failed to unmarshal merged VMClusterSpec JSON: %w", err) + } + + return mergedSpec, modified, nil +} + +// mergeMapsRecursive deeply merges overrideMap into baseMap. +// It handles nested maps (which correspond to nested structs after JSON unmarshal). +// Values from overrideMap overwrite values in baseMap. +// If an override value is nil, it explicitly clears the corresponding field in baseMap. +// It returns a boolean indicating if the baseMap was modified. +func mergeMapsRecursive(baseMap, overrideMap map[string]interface{}) bool { + modified := false + for key, overrideValue := range overrideMap { + if overrideValue == nil { + if _, ok := baseMap[key]; ok { + // If override explicitly sets a field to nil and it existed in base, delete it. + delete(baseMap, key) + modified = true + } + continue + } + + if baseVal, ok := baseMap[key]; ok { + if baseMapNested, isBaseMap := baseVal.(map[string]interface{}); isBaseMap { + if overrideMapNested, isOverrideMap := overrideValue.(map[string]interface{}); isOverrideMap { + // Both are nested maps, recurse + if mergeMapsRecursive(baseMapNested, overrideMapNested) { + modified = true + } + continue + } + } + } + + // For all other cases (scalar values, or when types for nested maps don't match), + // override the baseMap value. This handles explicit zero values and ensures + // overrides take precedence. + // We assign first, then check if it was a modification. + oldValue, exists := baseMap[key] + baseMap[key] = overrideValue // Force the overwrite for this key + if !exists || !reflect.DeepEqual(oldValue, overrideValue) { + modified = true + } + } + return modified +} + +// mergeVMClusterSpecs merges the zoneSpec into baseSpec and returns the merged result +// along with a boolean indicating whether any modifications were made. +func mergeVMClusterSpecs(baseSpec, zoneSpec vmv1beta1.VMClusterSpec) (vmv1beta1.VMClusterSpec, bool, error) { + baseSpecJSON, err := json.Marshal(baseSpec) + if err != nil { + return vmv1beta1.VMClusterSpec{}, false, fmt.Errorf("failed to marshal base VMClusterSpec: %w", err) + } + + zoneSpecJSON, err := json.Marshal(zoneSpec) + if err != nil { + return vmv1beta1.VMClusterSpec{}, false, fmt.Errorf("failed to marshal zone VMClusterSpec: %w", err) + } + + var baseMap map[string]interface{} + if err := json.Unmarshal(baseSpecJSON, &baseMap); err != nil { + return vmv1beta1.VMClusterSpec{}, false, fmt.Errorf("failed to unmarshal base VMClusterSpec to map: %w", err) + } + + var zoneMap map[string]interface{} + if err := json.Unmarshal(zoneSpecJSON, &zoneMap); err != nil { + return vmv1beta1.VMClusterSpec{}, false, fmt.Errorf("failed to unmarshal zone VMClusterSpec to map: %w", err) + } + + // Perform a deep merge: fields from zoneMap recursively overwrite corresponding fields in baseMap. + modified := mergeMapsRecursive(baseMap, zoneMap) + + mergedSpecJSON, err := json.Marshal(baseMap) + if err != nil { + return vmv1beta1.VMClusterSpec{}, false, fmt.Errorf("failed to marshal merged VMClusterSpec map: %w", err) + } + + mergedSpec := vmv1beta1.VMClusterSpec{} + if err := json.Unmarshal(mergedSpecJSON, &mergedSpec); err != nil { + return vmv1beta1.VMClusterSpec{}, false, fmt.Errorf("failed to unmarshal merged VMClusterSpec JSON: %w", err) + } + + return mergedSpec, modified, nil +} + +// waitForVMClusterReady polls VMCluster until it reports UpdateStatusOperational or deadline is hit. +func waitForVMClusterReady(ctx context.Context, rclient client.Client, vmCluster *vmv1beta1.VMCluster, deadline time.Duration) error { + var lastStatus vmv1beta1.UpdateStatus + // Fetch VMCluster in a loop until it has UpdateStatusOperational status + err := wait.PollUntilContextTimeout(ctx, time.Second, deadline, true, func(ctx context.Context) (done bool, err error) { + if err := rclient.Get(ctx, types.NamespacedName{Name: vmCluster.Name, Namespace: vmCluster.Namespace}, vmCluster); err != nil { + if k8serrors.IsNotFound(err) { + return false, fmt.Errorf("VMCluster not found") + } + return false, fmt.Errorf("failed to fetch VMCluster %s/%s: %w", vmCluster.Namespace, vmCluster.Name, err) + } + lastStatus = vmCluster.Status.UpdateStatus + return vmCluster.Status.UpdateStatus == vmv1beta1.UpdateStatusOperational, nil + }) + if err != nil { + return fmt.Errorf("failed to wait for VMCluster %s/%s to be ready: %w, current status: %s", vmCluster.Namespace, vmCluster.Name, err, lastStatus) + } + + return nil +} + +// setOwnerRefIfNeeded ensures obj has VMDistributedCluster owner reference set. +func setOwnerRefIfNeeded(cr *vmv1alpha1.VMDistributedCluster, obj client.Object, scheme *runtime.Scheme) (bool, error) { + if ok, err := controllerutil.HasOwnerReference(obj.GetOwnerReferences(), cr, scheme); err != nil { + return false, fmt.Errorf("failed to check owner reference for %s %s: %w", obj.GetObjectKind().GroupVersionKind().Kind, obj.GetName(), err) + } else if !ok { + // Set owner reference for the VMCluster to the VMDistributedCluster + if err := controllerutil.SetOwnerReference(cr, obj, scheme); err != nil { + return false, fmt.Errorf("failed to set owner reference for %s %s: %w", obj.GetObjectKind().GroupVersionKind().Kind, obj.GetName(), err) + } + return true, nil + } + return false, nil +} + +// ensureNoVMClusterOwners validates that vmClusterObj has no owner references other than cr. +func ensureNoVMClusterOwners(cr *vmv1alpha1.VMDistributedCluster, vmClusterObj *vmv1beta1.VMCluster) error { + for _, owner := range vmClusterObj.GetOwnerReferences() { + isCROwner := owner.APIVersion == cr.APIVersion && + owner.Kind == cr.Kind && + owner.Name == cr.GetName() + + if !isCROwner { + return fmt.Errorf("vmcluster %s has unexpected owner reference: %s/%s/%s", vmClusterObj.Name, owner.APIVersion, owner.Kind, owner.Name) + } + } + return nil +} diff --git a/internal/controller/operator/factory/vmdistributedcluster/vmcluster_test.go b/internal/controller/operator/factory/vmdistributedcluster/vmcluster_test.go new file mode 100644 index 000000000..fa99770e4 --- /dev/null +++ b/internal/controller/operator/factory/vmdistributedcluster/vmcluster_test.go @@ -0,0 +1,435 @@ +package vmdistributedcluster + +import ( + "context" + "encoding/json" + "testing" + "time" + + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + k8stypes "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + + vmv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" + vmv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" +) + +func TestMergeMapsRecursive_BasicAndNil(t *testing.T) { + base := map[string]interface{}{ + "a": map[string]interface{}{ + "b": "keep", + "c": "override-me", + }, + "d": "root-keep", + } + override := map[string]interface{}{ + "a": map[string]interface{}{ + "c": "new", + "z": "added", + }, + "e": "root-added", + } + // initial merge + modified := mergeMapsRecursive(base, override) + assert.True(t, modified) + assert.Equal(t, "keep", base["a"].(map[string]interface{})["b"]) + assert.Equal(t, "new", base["a"].(map[string]interface{})["c"]) + assert.Equal(t, "added", base["a"].(map[string]interface{})["z"]) + assert.Equal(t, "root-keep", base["d"]) + assert.Equal(t, "root-added", base["e"]) + + // nil override removes keys + override2 := map[string]interface{}{ + "a": map[string]interface{}{ + "z": nil, + }, + "d": nil, + } + modified2 := mergeMapsRecursive(base, override2) + assert.True(t, modified2) + _, ok := base["a"].(map[string]interface{})["z"] + assert.False(t, ok) + _, ok = base["d"] + assert.False(t, ok) +} + +func TestMergeVMClusterSpecs_DeepMerge(t *testing.T) { + base := vmv1beta1.VMClusterSpec{ + ClusterVersion: "v1.0.0", + VMSelect: &vmv1beta1.VMSelect{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptrTo(int32(1)), + ExtraArgs: map[string]string{"keep": "x", "override": "old"}, + }, + }, + VMInsert: &vmv1beta1.VMInsert{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptrTo(int32(1)), + ExtraArgs: map[string]string{"insert-arg": "1"}, + }, + }, + ServiceAccountName: "base-sa", + } + zone := vmv1beta1.VMClusterSpec{ + ClusterVersion: "v1.2.3", + VMSelect: &vmv1beta1.VMSelect{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptrTo(int32(3)), + ExtraArgs: map[string]string{"override": "new", "add": "y"}, + }, + }, + ServiceAccountName: "zone-sa", + } + + merged, modified, err := mergeVMClusterSpecs(base, zone) + assert.NoError(t, err) + assert.True(t, modified) + + // top-level + assert.Equal(t, "v1.2.3", merged.ClusterVersion) + assert.Equal(t, "zone-sa", merged.ServiceAccountName) + + // nested merge + if merged.VMSelect == nil || merged.VMSelect.ReplicaCount == nil { + t.Fatalf("merged.VMSelect or ReplicaCount is nil") + } + assert.Equal(t, int32(3), *merged.VMSelect.ReplicaCount) + assert.Equal(t, "x", merged.VMSelect.ExtraArgs["keep"]) + assert.Equal(t, "new", merged.VMSelect.ExtraArgs["override"]) + assert.Equal(t, "y", merged.VMSelect.ExtraArgs["add"]) + + // untouched subtree + if merged.VMInsert == nil || merged.VMInsert.ReplicaCount == nil { + t.Fatalf("merged.VMInsert or ReplicaCount is nil") + } + assert.Equal(t, int32(1), *merged.VMInsert.ReplicaCount) + assert.Equal(t, "1", merged.VMInsert.ExtraArgs["insert-arg"]) +} + +func TestApplyOverrideSpec_NilOverride(t *testing.T) { + base := vmv1beta1.VMClusterSpec{ + ClusterVersion: "v1.0.0", + ServiceAccountName: "base", + } + merged, modified, err := ApplyOverrideSpec(base, nil) + assert.NoError(t, err) + assert.False(t, modified) + assert.Equal(t, base, merged) + + // empty JSON override should be no-op + empty := &apiextensionsv1.JSON{Raw: []byte("{}")} + merged2, modified2, err := ApplyOverrideSpec(base, empty) + assert.NoError(t, err) + assert.False(t, modified2) + assert.Equal(t, base, merged2) +} + +func TestSetOwnerRefIfNeeded(t *testing.T) { + // scheme with our types + scheme := runtime.NewScheme() + _ = vmv1alpha1.AddToScheme(scheme) + _ = vmv1beta1.AddToScheme(scheme) + + cr := &vmv1alpha1.VMDistributedCluster{ + TypeMeta: metav1.TypeMeta{ + APIVersion: vmv1alpha1.GroupVersion.String(), + Kind: "VMDistributedCluster", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "vdc", + Namespace: "default", + UID: k8stypes.UID("owner-uid"), + }, + } + vmc := &vmv1beta1.VMCluster{ + TypeMeta: metav1.TypeMeta{ + APIVersion: vmv1beta1.GroupVersion.String(), + Kind: "VMCluster", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "vmc", + Namespace: "default", + }, + } + + modified, err := setOwnerRefIfNeeded(cr, vmc, scheme) + assert.NoError(t, err) + assert.True(t, modified) + assert.Len(t, vmc.OwnerReferences, 1) + assert.Equal(t, "vdc", vmc.OwnerReferences[0].Name) + + // second call should detect owner ref already set + modified2, err := setOwnerRefIfNeeded(cr, vmc, scheme) + assert.NoError(t, err) + assert.False(t, modified2) +} + +func TestEnsureNoVMClusterOwners(t *testing.T) { + cr := &vmv1alpha1.VMDistributedCluster{ + TypeMeta: metav1.TypeMeta{ + APIVersion: vmv1alpha1.GroupVersion.String(), + Kind: "VMDistributedCluster", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "vdc", + Namespace: "default", + UID: k8stypes.UID("owner-uid"), + }, + } + otherCR := &vmv1alpha1.VMDistributedCluster{ + TypeMeta: metav1.TypeMeta{ + APIVersion: vmv1alpha1.GroupVersion.String(), + Kind: "VMDistributedCluster", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "other", + Namespace: "default", + UID: k8stypes.UID("other-uid"), + }, + } + + vmc := &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: "vmc", + Namespace: "default", + OwnerReferences: []metav1.OwnerReference{ + { + APIVersion: otherCR.APIVersion, + Kind: otherCR.Kind, + Name: otherCR.Name, + UID: otherCR.UID, + }, + }, + }, + } + + err := ensureNoVMClusterOwners(cr, vmc) + assert.Error(t, err) + assert.Contains(t, err.Error(), "unexpected owner reference") +} + +func TestWaitForVMClusterReady_Success(t *testing.T) { + scheme := runtime.NewScheme() + _ = vmv1beta1.AddToScheme(scheme) + + vmc := &vmv1beta1.VMCluster{ + TypeMeta: metav1.TypeMeta{ + APIVersion: vmv1beta1.GroupVersion.String(), + Kind: "VMCluster", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "vmc", + Namespace: "default", + }, + Status: vmv1beta1.VMClusterStatus{ + StatusMetadata: vmv1beta1.StatusMetadata{ + UpdateStatus: vmv1beta1.UpdateStatusOperational, + }, + }, + } + + cl := fake.NewClientBuilder().WithScheme(scheme).WithObjects(vmc).Build() + ctx := context.Background() + err := waitForVMClusterReady(ctx, cl, vmc.DeepCopy(), 500*time.Millisecond) + assert.NoError(t, err) +} + +func TestWaitForVMClusterReady_Timeout(t *testing.T) { + scheme := runtime.NewScheme() + _ = vmv1beta1.AddToScheme(scheme) + + vmc := &vmv1beta1.VMCluster{ + TypeMeta: metav1.TypeMeta{ + APIVersion: vmv1beta1.GroupVersion.String(), + Kind: "VMCluster", + }, + ObjectMeta: metav1.ObjectMeta{ + Name: "vmc-stuck", + Namespace: "default", + }, + Status: vmv1beta1.VMClusterStatus{ + StatusMetadata: vmv1beta1.StatusMetadata{ + UpdateStatus: vmv1beta1.UpdateStatusExpanding, + }, + }, + } + + cl := fake.NewClientBuilder().WithScheme(scheme).WithObjects(vmc).Build() + ctx := context.Background() + err := waitForVMClusterReady(ctx, cl, vmc.DeepCopy(), 100*time.Millisecond) + assert.Error(t, err) +} + +func TestGetReferencedVMCluster(t *testing.T) { + scheme := runtime.NewScheme() + _ = vmv1beta1.AddToScheme(scheme) + + existing := &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: "exists", + Namespace: "default", + }, + } + cl := fake.NewClientBuilder().WithScheme(scheme).WithObjects(existing).Build() + + // ok + got, err := getReferencedVMCluster(context.Background(), cl, "default", &corev1.LocalObjectReference{Name: "exists"}) + assert.NoError(t, err) + assert.Equal(t, "exists", got.Name) + + // not found + _, err = getReferencedVMCluster(context.Background(), cl, "default", &corev1.LocalObjectReference{Name: "missing"}) + assert.Error(t, err) + assert.True(t, k8serrors.IsNotFound(err) || contains(err.Error(), "not found")) +} + +func TestFetchVMClusters_InlineAndRef(t *testing.T) { + scheme := runtime.NewScheme() + _ = vmv1alpha1.AddToScheme(scheme) + _ = vmv1beta1.AddToScheme(scheme) + + refCluster := &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: "ref", + Namespace: "ns", + }, + } + cl := fake.NewClientBuilder().WithScheme(scheme).WithObjects(refCluster).Build() + + inlineSpec := vmv1beta1.VMClusterSpec{ + ClusterVersion: "v0.1.0", + } + zones := []vmv1alpha1.VMClusterRefOrSpec{ + {Ref: &corev1.LocalObjectReference{Name: "ref"}}, + {Name: "inline", Spec: &inlineSpec}, + } + + got, err := fetchVMClusters(context.Background(), cl, "ns", zones) + assert.NoError(t, err) + assert.Len(t, got, 2) + assert.Equal(t, "ref", got[0].Name) + assert.Equal(t, "inline", got[1].Name) + assert.Equal(t, inlineSpec.ClusterVersion, got[1].Spec.ClusterVersion) +} + +func TestValidateVMClusterRefOrSpec_Matrix(t *testing.T) { + ok := vmv1alpha1.VMClusterRefOrSpec{Ref: &corev1.LocalObjectReference{Name: "a"}} + assert.NoError(t, validateVMClusterRefOrSpec(0, ok)) + + ok2 := vmv1alpha1.VMClusterRefOrSpec{Name: "b", Spec: &vmv1beta1.VMClusterSpec{}} + assert.NoError(t, validateVMClusterRefOrSpec(1, ok2)) + + both := vmv1alpha1.VMClusterRefOrSpec{ + Name: "c", + Ref: &corev1.LocalObjectReference{Name: "c"}, + Spec: &vmv1beta1.VMClusterSpec{}, + } + assert.Error(t, validateVMClusterRefOrSpec(2, both)) + + none := vmv1alpha1.VMClusterRefOrSpec{} + assert.Error(t, validateVMClusterRefOrSpec(3, none)) + + missingRefName := vmv1alpha1.VMClusterRefOrSpec{Ref: &corev1.LocalObjectReference{}} + assert.Error(t, validateVMClusterRefOrSpec(4, missingRefName)) + + missingSpecName := vmv1alpha1.VMClusterRefOrSpec{Spec: &vmv1beta1.VMClusterSpec{}} + assert.Error(t, validateVMClusterRefOrSpec(5, missingSpecName)) + + // Spec with OverrideSpec simultaneously + overrideJSON, _ := json.Marshal(vmv1beta1.VMClusterSpec{}) + bad := vmv1alpha1.VMClusterRefOrSpec{ + Name: "x", + Spec: &vmv1beta1.VMClusterSpec{}, + OverrideSpec: &apiextensionsv1.JSON{Raw: overrideJSON}, + } + assert.Error(t, validateVMClusterRefOrSpec(6, bad)) +} + +func TestApplyGlobalOverrideSpec(t *testing.T) { + base := vmv1beta1.VMClusterSpec{ + ClusterVersion: "v1.0.0", + ServiceAccountName: "base", + RetentionPeriod: "30d", + } + + // Test with nil GlobalOverrideSpec + globalOverride := (*apiextensionsv1.JSON)(nil) + merged, modified, err := ApplyOverrideSpec(base, globalOverride) + assert.NoError(t, err) + assert.False(t, modified) + assert.Equal(t, base, merged) + + // Test with empty GlobalOverrideSpec + emptyGlobal := &apiextensionsv1.JSON{Raw: []byte("{}")} + merged2, modified2, err := ApplyOverrideSpec(base, emptyGlobal) + assert.NoError(t, err) + assert.False(t, modified2) + assert.Equal(t, base, merged2) + + // Test with GlobalOverrideSpec that modifies top-level fields + globalTopLevel := &apiextensionsv1.JSON{Raw: []byte(`{"clusterVersion": "v2.0.0", "serviceAccountName": "global-sa"}`)} + merged3, modified3, err := ApplyOverrideSpec(base, globalTopLevel) + assert.NoError(t, err) + assert.True(t, modified3) + assert.Equal(t, "v2.0.0", merged3.ClusterVersion) + assert.Equal(t, "global-sa", merged3.ServiceAccountName) + assert.Equal(t, "30d", merged3.RetentionPeriod) // Unchanged field + + // Test with GlobalOverrideSpec that sets a field to null + globalNullify := &apiextensionsv1.JSON{Raw: []byte(`{"serviceAccountName": null}`)} + merged5, modified5, err := ApplyOverrideSpec(base, globalNullify) + assert.NoError(t, err) + assert.True(t, modified5) + assert.Equal(t, "", merged5.ServiceAccountName) // Should be empty string (null in JSON becomes empty string after unmarshal) +} + +func TestApplyGlobalAndClusterSpecificOverrideSpecs(t *testing.T) { + base := vmv1beta1.VMClusterSpec{ + ClusterVersion: "v1.0.0", + ServiceAccountName: "base", + RetentionPeriod: "30d", + } + + // Apply GlobalOverrideSpec first + globalOverride := &apiextensionsv1.JSON{Raw: []byte(`{"clusterVersion": "v2.0.0", "serviceAccountName": "global-sa"}`)} + merged1, modified1, err := ApplyOverrideSpec(base, globalOverride) + assert.NoError(t, err) + assert.True(t, modified1) + assert.Equal(t, "v2.0.0", merged1.ClusterVersion) + assert.Equal(t, "global-sa", merged1.ServiceAccountName) + assert.Equal(t, "30d", merged1.RetentionPeriod) + + // Then apply cluster-specific override + clusterOverride := &apiextensionsv1.JSON{Raw: []byte(`{"retentionPeriod": "10d", "clusterVersion": "v3.0.0"}`)} + merged2, modified2, err := ApplyOverrideSpec(merged1, clusterOverride) + assert.NoError(t, err) + assert.True(t, modified2) + assert.Equal(t, "v3.0.0", merged2.ClusterVersion) // Cluster-specific override should take precedence + assert.Equal(t, "global-sa", merged2.ServiceAccountName) // From global override, unchanged by cluster override + assert.Equal(t, "10d", merged2.RetentionPeriod) // From cluster override +} + +// helpers +func ptrTo[T any](v T) *T { return &v } + +func contains(s, sub string) bool { + return len(s) >= len(sub) && (s == sub || (len(sub) > 0 && (indexOf(s, sub) >= 0))) +} + +func indexOf(s, sub string) int { +outer: + for i := 0; i+len(sub) <= len(s); i++ { + for j := 0; j < len(sub); j++ { + if s[i+j] != sub[j] { + continue outer + } + } + return i + } + return -1 +} diff --git a/internal/controller/operator/factory/vmdistributedcluster/vmdistributedcluster.go b/internal/controller/operator/factory/vmdistributedcluster/vmdistributedcluster.go new file mode 100644 index 000000000..2dcab77ed --- /dev/null +++ b/internal/controller/operator/factory/vmdistributedcluster/vmdistributedcluster.go @@ -0,0 +1,204 @@ +package vmdistributedcluster + +import ( + "context" + "fmt" + "net/http" + "os" + "time" + + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" + + vmv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" + vmv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" +) + +var ( + defaultVMClusterWaitReadyDeadline = metav1.Duration{Duration: 5 * time.Minute} + defaultVMAgentFlushDeadlineDeadline = metav1.Duration{Duration: 1 * time.Minute} + defaultZoneUpdatePause = metav1.Duration{Duration: 1 * time.Minute} +) + +// CreateOrUpdate handles VM deployment reconciliation. +func CreateOrUpdate(ctx context.Context, cr *vmv1alpha1.VMDistributedCluster, rclient client.Client, scheme *runtime.Scheme, httpTimeout time.Duration) error { + // Store the previous CR for comparison + var prevCR *vmv1alpha1.VMDistributedCluster + if cr.ParsedLastAppliedSpec != nil { + prevCR = cr.DeepCopy() + prevCR.Spec = *cr.ParsedLastAppliedSpec + } + + // No actions performed if CR is paused + if cr.Paused() { + return nil + } + + // Validate zones, exit early if invalid + for i, zone := range cr.Spec.Zones.VMClusters { + if zone.Spec != nil && zone.Name == "" { + return fmt.Errorf("VMClusterRefOrSpec.Name must be set when Spec is provided for zone at index %d", i) + } + if zone.Spec == nil && zone.Ref == nil { + return fmt.Errorf("VMClusterRefOrSpec.Spec or VMClusterRefOrSpec.Ref must be set for zone at index %d", i) + } + if zone.Spec != nil && zone.Ref != nil { + return fmt.Errorf("either VMClusterRefOrSpec.Spec or VMClusterRefOrSpec.Ref must be set for zone at index %d", i) + } + } + + // Validate VMAgent + if cr.Spec.VMAgent.Name == "" { + return fmt.Errorf("VMAgent.Name must be set") + } + + // Validate VMAuth + if cr.Spec.VMAuth.Name == "" { + return fmt.Errorf("VMAuth.Name must be set") + } + + // Fetch VMCluster statuses by name (needed to build target refs for the VMUser). + vmClusters, err := fetchVMClusters(ctx, rclient, cr.Namespace, cr.Spec.Zones.VMClusters) + if err != nil { + return fmt.Errorf("failed to fetch vmclusters: %w", err) + } + + // Throw error if VMCluster has any other owner - that means it is managed by one instance of VMDistributedCluster only + for _, vmCluster := range vmClusters { + err := ensureNoVMClusterOwners(cr, vmCluster) + if err != nil { + return fmt.Errorf("failed to validate owner references for unreferenced vmcluster %s: %w", vmCluster.Name, err) + } + } + + // Ensure VMAuth exists first so we can set it as the owner for the automatically-created VMUser. + err = createOrUpdateVMAuthLB(ctx, rclient, cr, prevCR, vmClusters) + if err != nil { + return fmt.Errorf("failed to update or create vmauth: %w", err) + } + + // Update or create the VMAgent + vmAgentObj, err := updateOrCreateVMAgent(ctx, rclient, cr, scheme, vmClusters) + if err != nil { + return fmt.Errorf("failed to update or create VMAgent: %w", err) + } + + // Setup deadlines and timeouts + vmclusterWaitReadyDeadline := defaultVMClusterWaitReadyDeadline.Duration + if cr.Spec.ReadyDeadline != nil { + vmclusterWaitReadyDeadline = cr.Spec.ReadyDeadline.Duration + } + vmAgentFlushDeadlineDeadline := defaultVMAgentFlushDeadlineDeadline.Duration + if cr.Spec.VMAgentFlushDeadline != nil { + vmAgentFlushDeadlineDeadline = cr.Spec.VMAgentFlushDeadline.Duration + } + zoneUpdatePause := defaultZoneUpdatePause.Duration + if cr.Spec.ZoneUpdatePause != nil { + zoneUpdatePause = cr.Spec.ZoneUpdatePause.Duration + } + + // Setup custom HTTP client + httpClient := &http.Client{ + Timeout: httpTimeout, + } + + // Apply changes to VMClusters one by one if new spec needs to be applied + for i, vmClusterObj := range vmClusters { + zoneRefOrSpec := cr.Spec.Zones.VMClusters[i] + + needsToBeCreated := false + // Get vmClusterObj in case it doesn't exist or has changed + if err = rclient.Get(ctx, types.NamespacedName{Name: vmClusterObj.Name, Namespace: vmClusterObj.Namespace}, vmClusterObj); k8serrors.IsNotFound(err) { + needsToBeCreated = true + } + + // Update the VMCluster when overrideSpec needs to be applied or ownerref set + mergedSpec := vmClusterObj.Spec + modifiedSpec := false + + // Apply GlobalOverrideSpec if it is set + if cr.Spec.Zones.GlobalOverrideSpec != nil { + mergedSpec, modifiedSpec, err = ApplyOverrideSpec(vmClusterObj.Spec, cr.Spec.Zones.GlobalOverrideSpec) + if err != nil { + return fmt.Errorf("failed to apply global override spec for vmcluster %s at index %d: %w", vmClusterObj.Name, i, err) + } + } + // Apply cluster-specific override if it exist + if zoneRefOrSpec.Ref != nil && zoneRefOrSpec.OverrideSpec != nil { + mergedSpec, modifiedSpec, err = ApplyOverrideSpec(mergedSpec, zoneRefOrSpec.OverrideSpec) + if err != nil { + return fmt.Errorf("failed to apply override spec for vmcluster %s at index %d: %w", vmClusterObj.Name, i, err) + } + } + if zoneRefOrSpec.Spec != nil { + mergedSpec, modifiedSpec, err = mergeVMClusterSpecs(mergedSpec, *zoneRefOrSpec.Spec) + if err != nil { + return fmt.Errorf("failed to merge spec for vmcluster %s at index %d: %w", vmClusterObj.Name, i, err) + } + } + + // Set owner reference for this vmcluster + modifiedOwnerRef, err := setOwnerRefIfNeeded(cr, vmClusterObj, scheme) + if err != nil { + return fmt.Errorf("failed to set owner reference for vmcluster %s: %w", vmClusterObj.Name, err) + } + if !needsToBeCreated && !modifiedSpec && !modifiedOwnerRef { + // No changes required + continue + } + + vmClusterObj.Spec = mergedSpec + + if needsToBeCreated { + if err := rclient.Create(ctx, vmClusterObj); err != nil { + return fmt.Errorf("failed to create vmcluster %s at index %d after applying override spec: %w", vmClusterObj.Name, i, err) + } + } else { + // Update vmauth lb with excluded cluster + activeVMClusters := make([]*vmv1beta1.VMCluster, 0, len(vmClusters)-1) + for _, vmc := range vmClusters { + if vmc.Name == vmClusterObj.Name { + continue + } + activeVMClusters = append(activeVMClusters, vmc) + } + if err := createOrUpdateVMAuthLB(ctx, rclient, cr, prevCR, activeVMClusters); err != nil { + return fmt.Errorf("failed to update vmauth lb with excluded vmcluster %s: %w", vmClusterObj.Name, err) + } + + // Apply the updated object + if err := rclient.Update(ctx, vmClusterObj); err != nil { + return fmt.Errorf("failed to update vmcluster %s at index %d after applying override spec: %w", vmClusterObj.Name, i, err) + } + } + + // Update vmauth lb with the included cluster (for both new and updated clusters) + if err := createOrUpdateVMAuthLB(ctx, rclient, cr, prevCR, vmClusters); err != nil { + return fmt.Errorf("failed to update vmauth lb with included vmcluster %s: %w", vmClusterObj.Name, err) + } + + // Wait for VMCluster to be ready + if err := waitForVMClusterReady(ctx, rclient, vmClusterObj, vmclusterWaitReadyDeadline); err != nil { + return fmt.Errorf("failed to wait for VMCluster %s/%s to be ready: %w", vmClusterObj.Namespace, vmClusterObj.Name, err) + } + + // Wait for VMAgent metrics to show no pending queue + if err := waitForVMClusterVMAgentMetrics(ctx, httpClient, vmAgentObj, vmAgentFlushDeadlineDeadline, rclient); err != nil { + // Ignore this error when running e2e tests - these need to run in the same network as pods + if os.Getenv("E2E_TEST") != "true" { + return fmt.Errorf("failed to wait for VMAgent metrics to show no pending queue: %w", err) + } + } + + if err := createOrUpdateVMAuthLB(ctx, rclient, cr, prevCR, vmClusters); err != nil { + return fmt.Errorf("failed to update vmauth lb with included vmcluster %s: %w", vmClusterObj.Name, err) + } + + // Sleep for zoneUpdatePause time between VMClusters updates + time.Sleep(zoneUpdatePause) + } + return nil +} diff --git a/internal/controller/operator/factory/vmdistributedcluster/vmdistributedcluster_test.go b/internal/controller/operator/factory/vmdistributedcluster/vmdistributedcluster_test.go new file mode 100644 index 000000000..7e53a1000 --- /dev/null +++ b/internal/controller/operator/factory/vmdistributedcluster/vmdistributedcluster_test.go @@ -0,0 +1,389 @@ +package vmdistributedcluster + +import ( + "context" + "encoding/json" + "fmt" + "reflect" + "sync" + "testing" + "time" + + "github.com/stretchr/testify/assert" + corev1 "k8s.io/api/core/v1" + discoveryv1 "k8s.io/api/discovery/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/utils/ptr" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/client/fake" + + vmv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" + vmv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" + "github.com/VictoriaMetrics/operator/internal/controller/operator/factory/build" +) + +const ( + vmclusterWaitReadyDeadline = time.Minute + httpTimeout = time.Second * 5 +) + +// action represents a client action +type action struct { + Method string + ObjectKey client.ObjectKey + Object client.Object +} + +var _ client.Client = (*trackingClient)(nil) + +type trackingClient struct { + client.Client // The embedded fake client + Actions []action + objects map[client.ObjectKey]client.Object // Store created/updated objects + mu sync.Mutex +} + +type trackingStatusWriter struct { + client.StatusWriter + *trackingClient +} + +func (tc *trackingClient) Status() client.StatusWriter { + return &trackingStatusWriter{tc.Client.Status(), tc} +} + +func (tc *trackingClient) Get(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error { + tc.mu.Lock() + defer tc.mu.Unlock() + tc.Actions = append(tc.Actions, action{Method: "Get", ObjectKey: key, Object: obj}) + + // If we have a stored copy in the internal map, use it and avoid calling the + // underlying fake client (which may try to use managedFields/structured-merge-diff). + if stored, ok := tc.objects[key]; ok && stored != nil { + // Deep-copy stored into obj via JSON marshal/unmarshal to avoid aliasing. + b, err := json.Marshal(stored) + if err != nil { + return fmt.Errorf("failed to marshal stored object for Get: %w", err) + } + if err := json.Unmarshal(b, obj); err != nil { + return fmt.Errorf("failed to unmarshal stored object into target for Get: %w", err) + } + return nil + } + + // Fallback to underlying client if not present in the internal map. + return tc.Client.Get(ctx, key, obj, opts...) +} + +func (tc *trackingClient) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error { + tc.mu.Lock() + defer tc.mu.Unlock() + tc.Actions = append(tc.Actions, action{Method: "Update", ObjectKey: client.ObjectKeyFromObject(obj), Object: obj}) + + // Deep copy the provided object and store it in the internal map. This avoids + // invoking the fake client's Update logic which may interact with managedFields + // and cause reflect panics if TypeMeta is not present or other edge cases. + b, err := json.Marshal(obj) + if err != nil { + return fmt.Errorf("failed to marshal object for Update: %w", err) + } + stored := reflect.New(reflect.TypeOf(obj).Elem()).Interface().(client.Object) + if err := json.Unmarshal(b, stored); err != nil { + return fmt.Errorf("failed to unmarshal object for Update: %w", err) + } + tc.objects[client.ObjectKeyFromObject(stored)] = stored + return nil +} + +func (tc *trackingClient) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error { + tc.mu.Lock() + defer tc.mu.Unlock() + + // Ensure TypeMeta is set for objects created in tests. The fake client can + // attempt to use structured-merge-diff/managed fields which expects TypeMeta + // to be populated. Tests often construct objects without TypeMeta, which + // leads to reflect panics inside the fake client. Populate TypeMeta for + // common types used in these tests to avoid that where possible. + switch o := obj.(type) { + case *vmv1beta1.VMAgent: + if o.Kind == "" { + o.TypeMeta = metav1.TypeMeta{APIVersion: vmv1beta1.GroupVersion.String(), Kind: "VMAgent"} + } + case *vmv1beta1.VMCluster: + if o.Kind == "" { + o.TypeMeta = metav1.TypeMeta{APIVersion: vmv1beta1.GroupVersion.String(), Kind: "VMCluster"} + } + case *vmv1beta1.VMUser: + if o.Kind == "" { + o.TypeMeta = metav1.TypeMeta{APIVersion: vmv1beta1.GroupVersion.String(), Kind: "VMUser"} + } + case *corev1.ConfigMap: + if o.Kind == "" { + o.TypeMeta = metav1.TypeMeta{APIVersion: corev1.SchemeGroupVersion.String(), Kind: "ConfigMap"} + } + } + + // Deep copy the object via JSON marshal/unmarshal and store in internal map. + b, err := json.Marshal(obj) + if err != nil { + return fmt.Errorf("failed to marshal object for Create: %w", err) + } + stored := reflect.New(reflect.TypeOf(obj).Elem()).Interface().(client.Object) + if err := json.Unmarshal(b, stored); err != nil { + return fmt.Errorf("failed to unmarshal object for Create: %w", err) + } + tc.objects[client.ObjectKeyFromObject(stored)] = stored + + tc.Actions = append(tc.Actions, action{Method: "Create", ObjectKey: client.ObjectKeyFromObject(obj), Object: obj}) + // Do not call underlying client's Create to avoid managedFields/structured-merge interactions in tests. + return nil +} + +func (tc *trackingClient) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error { + tc.mu.Lock() + defer tc.mu.Unlock() + tc.Actions = append(tc.Actions, action{Method: "Delete", ObjectKey: client.ObjectKeyFromObject(obj), Object: obj}) + return tc.Client.Delete(ctx, obj, opts...) +} + +var _ client.StatusClient = (*trackingClient)(nil) + +func (tsw *trackingStatusWriter) Create(ctx context.Context, obj client.Object, subResource client.Object, opts ...client.SubResourceCreateOption) error { + tsw.mu.Lock() + defer tsw.mu.Unlock() + tsw.Actions = append(tsw.Actions, action{Method: "StatusCreate", ObjectKey: client.ObjectKeyFromObject(obj), Object: obj}) + return tsw.StatusWriter.Create(ctx, obj, subResource, opts...) +} + +func (tsw *trackingStatusWriter) Update(ctx context.Context, obj client.Object, opts ...client.SubResourceUpdateOption) error { + tsw.mu.Lock() + defer tsw.mu.Unlock() + tsw.Actions = append(tsw.Actions, action{Method: "StatusUpdate", ObjectKey: client.ObjectKeyFromObject(obj), Object: obj}) + return tsw.StatusWriter.Update(ctx, obj, opts...) +} + +func (tsw *trackingStatusWriter) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.SubResourcePatchOption) error { + tsw.mu.Lock() + defer tsw.mu.Unlock() + tsw.Actions = append(tsw.Actions, action{Method: "StatusPatch", ObjectKey: client.ObjectKeyFromObject(obj), Object: obj}) + return tsw.StatusWriter.Patch(ctx, obj, patch, opts...) +} + +var _ client.SubResourceWriter = (*trackingStatusWriter)(nil) + +func newVMUser(name string, targetRefs []vmv1beta1.TargetRef) *vmv1beta1.VMUser { + return &vmv1beta1.VMUser{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: "default", + }, + Spec: vmv1beta1.VMUserSpec{ + TargetRefs: targetRefs, + }, + } +} + +func newVMCluster(name, version string) *vmv1beta1.VMCluster { + return &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: "default", + Labels: map[string]string{"tenant": "default"}, + }, + Spec: vmv1beta1.VMClusterSpec{ + ClusterVersion: version, + VMSelect: &vmv1beta1.VMSelect{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To(int32(1)), + }, + }, + VMInsert: &vmv1beta1.VMInsert{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To(int32(1)), + }, + }, + VMStorage: &vmv1beta1.VMStorage{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To(int32(1)), + }, + }, + }, + Status: vmv1beta1.VMClusterStatus{ + StatusMetadata: vmv1beta1.StatusMetadata{ + UpdateStatus: vmv1beta1.UpdateStatusOperational, + }, + }, + } +} + +// newVMDistributedCluster constructs a VMDistributedCluster for tests. +// It accepts an optional VMUser parameter (legacy callers may supply a VMUserNameAndSpec), +// and/or a VMAuth parameter. Any supplied VMUser values are ignored (kept for compatibility). +// The VMAuth value, if provided among extras, will be used to populate the CR's Spec.VMAuth. +func newVMDistributedCluster(name string, zones []vmv1alpha1.VMClusterRefOrSpec, vmAgentSpec vmv1alpha1.VMAgentNameAndSpec, extras ...interface{}) *vmv1alpha1.VMDistributedCluster { + var vmAuth vmv1alpha1.VMAuthNameAndSpec + + // Parse extras to find VMAuth (ignore any legacy VMUser parameters). + for _, e := range extras { + switch v := e.(type) { + case vmv1alpha1.VMAuthNameAndSpec: + vmAuth = v + case *vmv1alpha1.VMAuthNameAndSpec: + if v != nil { + vmAuth = *v + } + default: + // unknown extra param — ignore + } + } + + return &vmv1alpha1.VMDistributedCluster{ + TypeMeta: metav1.TypeMeta{ + Kind: "VMDistributedCluster", + APIVersion: vmv1alpha1.GroupVersion.String(), + }, + ObjectMeta: metav1.ObjectMeta{ + Name: name, + Namespace: "default", + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + Zones: vmv1alpha1.ZoneSpec{VMClusters: zones}, + VMAgent: vmAgentSpec, + VMAuth: vmAuth, + }, + } +} + +type testData struct { + vmagent *vmv1beta1.VMAgent + vmusers []*vmv1beta1.VMUser + vmcluster1 *vmv1beta1.VMCluster + vmcluster2 *vmv1beta1.VMCluster + cr *vmv1alpha1.VMDistributedCluster + trackingClient *trackingClient +} + +func beforeEach() testData { + scheme := runtime.NewScheme() + _ = vmv1alpha1.AddToScheme(scheme) + _ = vmv1beta1.AddToScheme(scheme) + _ = corev1.AddToScheme(scheme) + _ = discoveryv1.AddToScheme(scheme) + + vmagent := &vmv1beta1.VMAgent{ + ObjectMeta: metav1.ObjectMeta{Name: "test-vmagent", Namespace: "default"}, + Spec: vmv1beta1.VMAgentSpec{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ReplicaCount: ptr.To(int32(1))}, + }, + Status: vmv1beta1.VMAgentStatus{Replicas: 1}, + } + vmuser1 := newVMUser("vmuser-1", []vmv1beta1.TargetRef{ + { + CRD: &vmv1beta1.CRDRef{Kind: "VMCluster/vmselect", Name: "vmcluster-1", Namespace: "default"}, + TargetPathSuffix: "/select/0/prometheus/api/v1", + }, + }) + vmuser2 := newVMUser("vmuser-2", []vmv1beta1.TargetRef{ + { + CRD: &vmv1beta1.CRDRef{Kind: "VMCluster/vmselect", Name: "vmcluster-2", Namespace: "default"}, + TargetPathSuffix: "/select/0/prometheus/api/v1", + }, + }) + vmcluster1 := newVMCluster("vmcluster-1", "v1.0.0") + vmcluster2 := newVMCluster("vmcluster-2", "v1.0.0") // keep original helper semantics + + zones := []vmv1alpha1.VMClusterRefOrSpec{ + {Ref: &corev1.LocalObjectReference{Name: "vmcluster-1"}}, + {Ref: &corev1.LocalObjectReference{Name: "vmcluster-2"}}, + } + vmAgentSpec := vmv1alpha1.VMAgentNameAndSpec{Name: vmagent.Name} + cr := newVMDistributedCluster("test-vdc", zones, vmAgentSpec, vmv1alpha1.VMAuthNameAndSpec{Name: "vmauth-proxy"}) + + // Create a new trackingClient + rclient := fake.NewClientBuilder().WithScheme(scheme).WithObjects( + vmagent, + vmuser1, + vmuser2, + vmcluster1, + vmcluster2, + cr, + ).Build() + build.AddDefaults(rclient.Scheme()) + tc := &trackingClient{ + Client: rclient, + Actions: []action{}, + objects: make(map[client.ObjectKey]client.Object), + } + return testData{ + vmagent: vmagent, + vmusers: []*vmv1beta1.VMUser{vmuser1, vmuser2}, + vmcluster1: vmcluster1, + vmcluster2: vmcluster2, + cr: cr, + trackingClient: tc, + } +} + +func TestCreateOrUpdate_ErrorHandling(t *testing.T) { + scheme := runtime.NewScheme() + _ = vmv1alpha1.AddToScheme(scheme) + _ = vmv1beta1.AddToScheme(scheme) + _ = corev1.AddToScheme(scheme) + + t.Run("Paused CR should do nothing", func(t *testing.T) { + data := beforeEach() + data.cr.Spec.Paused = true + rclient := data.trackingClient + ctx := context.TODO() + + err := CreateOrUpdate(ctx, data.cr, rclient, scheme, httpTimeout) + assert.NoError(t, err) // No error as it's paused + assert.Empty(t, rclient.Actions) + }) + + t.Run("Missing VMCluster should return error", func(t *testing.T) { + data := beforeEach() + data.cr.Spec.Zones.VMClusters[0].Ref.Name = "non-existent-vmcluster" + rclient := data.trackingClient + ctx := context.TODO() + + err := CreateOrUpdate(ctx, data.cr, rclient, scheme, httpTimeout) + assert.Error(t, err) + assert.Contains(t, err.Error(), "failed to fetch vmclusters") + }) + + t.Run("VMClusterRefOrSpec validation errors", func(t *testing.T) { + data := beforeEach() + rclient := data.trackingClient + ctx := context.TODO() + + // Both Ref and Spec set + data.cr.Spec.Zones = vmv1alpha1.ZoneSpec{VMClusters: []vmv1alpha1.VMClusterRefOrSpec{ + { + Name: "vmcluster-1", + Ref: &corev1.LocalObjectReference{Name: "vmcluster-1"}, + Spec: &vmv1beta1.VMClusterSpec{}, + }, + }} + err := CreateOrUpdate(ctx, data.cr, rclient, scheme, httpTimeout) + assert.Error(t, err) + assert.Contains(t, err.Error(), "either VMClusterRefOrSpec.Spec or VMClusterRefOrSpec.Ref must be set for zone at index 0") + + // Neither Ref nor Spec set + data.cr.Spec.Zones = vmv1alpha1.ZoneSpec{VMClusters: []vmv1alpha1.VMClusterRefOrSpec{ + {}, + }} + err = CreateOrUpdate(ctx, data.cr, rclient, scheme, httpTimeout) + assert.Error(t, err) + assert.Contains(t, err.Error(), "VMClusterRefOrSpec.Spec or VMClusterRefOrSpec.Ref must be set for zone at index 0") + + // Spec provided but Name missing + data.cr.Spec.Zones = vmv1alpha1.ZoneSpec{VMClusters: []vmv1alpha1.VMClusterRefOrSpec{ + {Spec: &vmv1beta1.VMClusterSpec{}}, + }} + err = CreateOrUpdate(ctx, data.cr, rclient, scheme, httpTimeout) + assert.Error(t, err) + assert.Contains(t, err.Error(), "VMClusterRefOrSpec.Name must be set when Spec is provided for zone at index 0") + }) +} diff --git a/internal/controller/operator/objects_stat.go b/internal/controller/operator/objects_stat.go index 712206011..09f21a2fa 100644 --- a/internal/controller/operator/objects_stat.go +++ b/internal/controller/operator/objects_stat.go @@ -49,7 +49,7 @@ func newCollector() *objectCollector { "vmagent", "vmalert", "vmsingle", "vmcluster", "vmalertmanager", "vmauth", "vlogs", "vlsingle", "vlcluster", "vmalertmanagerconfig", "vmrule", "vmuser", "vmservicescrape", "vmstaticscrape", "vmnodescrape", "vmpodscrape", "vmprobescrape", "vmscrapeconfig", "vmanomaly", "vlagent", - "vtsingle", "vtcluster", + "vtsingle", "vtcluster", "vmdistributedcluster", } for _, controller := range registeredObjects { oc.objectsByController[controller] = map[string]struct{}{} diff --git a/internal/controller/operator/suite_test.go b/internal/controller/operator/suite_test.go index 957a58486..eda9fca76 100644 --- a/internal/controller/operator/suite_test.go +++ b/internal/controller/operator/suite_test.go @@ -34,6 +34,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/log/zap" vmv1 "github.com/VictoriaMetrics/operator/api/operator/v1" + vmv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" vmv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" ) @@ -77,6 +78,9 @@ var _ = BeforeSuite(func(done Done) { err = apiextensionsv1.AddToScheme(scheme.Scheme) Expect(err).NotTo(HaveOccurred()) + err = vmv1alpha1.AddToScheme(scheme.Scheme) + Expect(err).NotTo(HaveOccurred()) + // +kubebuilder:scaffold:scheme k8sClient, err = client.New(cfg, client.Options{Scheme: scheme.Scheme}) diff --git a/internal/controller/operator/vmclusterdistributed_controller.go b/internal/controller/operator/vmclusterdistributed_controller.go new file mode 100644 index 000000000..862c7f256 --- /dev/null +++ b/internal/controller/operator/vmclusterdistributed_controller.go @@ -0,0 +1,113 @@ +/* + + +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. +*/ + +package operator + +import ( + "context" + "fmt" + "time" + + "github.com/go-logr/logr" + "k8s.io/apimachinery/pkg/runtime" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + + vmv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" + "github.com/VictoriaMetrics/operator/internal/config" + "github.com/VictoriaMetrics/operator/internal/controller/operator/factory/finalize" + "github.com/VictoriaMetrics/operator/internal/controller/operator/factory/logger" + "github.com/VictoriaMetrics/operator/internal/controller/operator/factory/vmdistributedcluster" +) + +const ( + httpTimeout = 10 * time.Second +) + +// VMDistributedClusterReconciler reconciles a VMDistributedCluster object +type VMDistributedClusterReconciler struct { + client.Client + BaseConf *config.BaseOperatorConf + Log logr.Logger + OriginScheme *runtime.Scheme +} + +// Init implements crdController interface +func (r *VMDistributedClusterReconciler) Init(rclient client.Client, l logr.Logger, sc *runtime.Scheme, cf *config.BaseOperatorConf) { + r.Client = rclient + r.Log = l.WithName("controller.VMDistributedClusterReconciler") + r.OriginScheme = sc + r.BaseConf = cf +} + +// +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmdistributedclusters,verbs=get;list;watch;create;update;patch;delete +// +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmdistributedclusters/status,verbs=get;update;patch +// +kubebuilder:rbac:groups=operator.victoriametrics.com,resources=vmdistributedclusters/finalizers,verbs=update +func (r *VMDistributedClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (result ctrl.Result, err error) { + l := r.Log.WithValues("vmdistributedcluster", req.Name, "namespace", req.Namespace) + ctx = logger.AddToContext(ctx, l) + instance := &vmv1alpha1.VMDistributedCluster{} + + // Handle reconcile errors + defer func() { + result, err = handleReconcileErr(ctx, r.Client, instance, result, err) + }() + + // Fetch VMDistributedCluster instance + if err := r.Get(ctx, req.NamespacedName, instance); err != nil { + return result, &getError{err, "vmdistributedcluster", req} + } + + // Register metrics + RegisterObjectStat(instance, "vmdistributedcluster") + + // Check if the instance is being deleted + if !instance.DeletionTimestamp.IsZero() { + if err := finalize.OnVMDistributedClusterDelete(ctx, r, instance); err != nil { + return result, fmt.Errorf("cannot remove finalizer from vmdistributedcluster: %w", err) + } + return result, nil + } + // Check parsing error + if instance.Spec.ParsingError != "" { + return result, &parsingError{instance.Spec.ParsingError, "vmdistributedcluster"} + } + + // Add finalizer if necessary + if err := finalize.AddFinalizer(ctx, r.Client, instance); err != nil { + return result, err + } + r.Client.Scheme().Default(instance) + result, err = reconcileAndTrackStatus(ctx, r.Client, instance.DeepCopy(), func() (ctrl.Result, error) { + if err := vmdistributedcluster.CreateOrUpdate(ctx, instance, r, r.OriginScheme, httpTimeout); err != nil { + return result, fmt.Errorf("vmdistributedcluster %s update failed: %w", instance.Name, err) + } + + return result, nil + }) + if err == nil { + result.RequeueAfter = r.BaseConf.ResyncAfterDuration() + } + return +} + +// SetupWithManager sets up the controller with the Manager. +func (r *VMDistributedClusterReconciler) SetupWithManager(mgr ctrl.Manager) error { + return ctrl.NewControllerManagedBy(mgr). + For(&vmv1alpha1.VMDistributedCluster{}). + Named("operator-VMDistributedCluster"). + Complete(r) +} diff --git a/internal/controller/operator/vmclusterdistributed_controller_test.go b/internal/controller/operator/vmclusterdistributed_controller_test.go new file mode 100644 index 000000000..09febcfe3 --- /dev/null +++ b/internal/controller/operator/vmclusterdistributed_controller_test.go @@ -0,0 +1,80 @@ +/* + + +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. +*/ + +package operator + +import ( + "context" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/reconcile" + + vmv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" +) + +var _ = Describe("VMDistributedCluster Controller", func() { + Context("When reconciling a resource", func() { + const resourceName = "test-resource" + + ctx := context.Background() + + typeNamespacedName := types.NamespacedName{ + Name: resourceName, + Namespace: "default", + } + VMDistributedCluster := &vmv1alpha1.VMDistributedCluster{} + + BeforeEach(func() { + By("creating the custom resource for the Kind VMDistributedCluster") + err := k8sClient.Get(ctx, typeNamespacedName, VMDistributedCluster) + if err != nil && k8serrors.IsNotFound(err) { + resource := &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: resourceName, + Namespace: "default", + }, + // TODO(user): Specify other spec details if needed. + } + Expect(k8sClient.Create(ctx, resource)).To(Succeed()) + } + }) + + AfterEach(func() { + resource := &vmv1alpha1.VMDistributedCluster{} + err := k8sClient.Get(ctx, typeNamespacedName, resource) + Expect(err).NotTo(HaveOccurred()) + + By("Cleanup the specific resource instance VMDistributedCluster") + Expect(k8sClient.Delete(ctx, resource)).To(Succeed()) + }) + It("should successfully reconcile the resource", func() { + By("Reconciling the created resource") + controllerReconciler := &VMDistributedClusterReconciler{ + Client: k8sClient, + OriginScheme: k8sClient.Scheme(), + } + + _, err := controllerReconciler.Reconcile(ctx, reconcile.Request{ + NamespacedName: typeNamespacedName, + }) + Expect(err).NotTo(HaveOccurred()) + }) + }) +}) diff --git a/internal/manager/manager.go b/internal/manager/manager.go index 820260fe1..db3c2c2c2 100644 --- a/internal/manager/manager.go +++ b/internal/manager/manager.go @@ -42,6 +42,7 @@ import ( gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" vmv1 "github.com/VictoriaMetrics/operator/api/operator/v1" + vmv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" vmv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" "github.com/VictoriaMetrics/operator/internal/config" vmcontroller "github.com/VictoriaMetrics/operator/internal/controller/operator" @@ -124,6 +125,7 @@ var ( func init() { utilruntime.Must(clientgoscheme.AddToScheme(scheme)) + utilruntime.Must(vmv1alpha1.AddToScheme(scheme)) utilruntime.Must(vmv1beta1.AddToScheme(scheme)) utilruntime.Must(vmv1.AddToScheme(scheme)) utilruntime.Must(metav1.AddToScheme(scheme)) @@ -488,6 +490,7 @@ var controllersByName = map[string]crdController{ "VMNodeScrape": &vmcontroller.VMNodeScrapeReconciler{}, "VMStaticScrape": &vmcontroller.VMStaticScrapeReconciler{}, "VMScrapeConfig": &vmcontroller.VMScrapeConfigReconciler{}, + "VMDistributedCluster": &vmcontroller.VMDistributedClusterReconciler{}, } func initControllers(mgr ctrl.Manager, l logr.Logger, bs *config.BaseOperatorConf) error { diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index bb9686c25..3f42937b6 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -29,11 +29,12 @@ import ( ) var ( - eventualDeploymentAppReadyTimeout = 60 * time.Second - eventualStatefulsetAppReadyTimeout = 80 * time.Second - eventualDeletionTimeout = 45 * time.Second - eventualDeploymentPodTimeout = 25 * time.Second - eventualExpandingTimeout = 25 * time.Second + eventualDeploymentAppReadyTimeout = 60 * time.Second + eventualStatefulsetAppReadyTimeout = 80 * time.Second + eventualDeletionTimeout = 45 * time.Second + eventualDeploymentPodTimeout = 25 * time.Second + eventualExpandingTimeout = 25 * time.Second + eventualVMDistributedClusterExpandingTimeout = 5 * time.Minute ) // Run e2e tests using the Ginkgo runner. diff --git a/test/e2e/suite/suite.go b/test/e2e/suite/suite.go index 81bdf4add..aac7cf1f3 100644 --- a/test/e2e/suite/suite.go +++ b/test/e2e/suite/suite.go @@ -27,6 +27,7 @@ import ( gwapiv1 "sigs.k8s.io/gateway-api/apis/v1" vmv1 "github.com/VictoriaMetrics/operator/api/operator/v1" + vmv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" vmv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" "github.com/VictoriaMetrics/operator/internal/controller/operator/factory/build" "github.com/VictoriaMetrics/operator/internal/manager" @@ -39,7 +40,9 @@ var stopped = make(chan struct{}) // GetClient returns kubernetes client for cluster connection func GetClient() client.Client { - err := vmv1beta1.AddToScheme(scheme.Scheme) + err := vmv1alpha1.AddToScheme(scheme.Scheme) + Expect(err).NotTo(HaveOccurred()) + err = vmv1beta1.AddToScheme(scheme.Scheme) Expect(err).NotTo(HaveOccurred()) err = vmv1.AddToScheme(scheme.Scheme) Expect(err).NotTo(HaveOccurred()) diff --git a/test/e2e/vmdistributedcluster_test.go b/test/e2e/vmdistributedcluster_test.go new file mode 100644 index 000000000..44bacf3bc --- /dev/null +++ b/test/e2e/vmdistributedcluster_test.go @@ -0,0 +1,1077 @@ +package e2e + +import ( + "context" + "fmt" + "os" + "time" + + . "github.com/onsi/ginkgo/v2" + . "github.com/onsi/gomega" + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" + apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + k8serrors "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/types" + "k8s.io/utils/ptr" + "sigs.k8s.io/controller-runtime/pkg/client" + + vmv1alpha1 "github.com/VictoriaMetrics/operator/api/operator/v1alpha1" + vmv1beta1 "github.com/VictoriaMetrics/operator/api/operator/v1beta1" + "github.com/VictoriaMetrics/operator/internal/controller/operator/factory/finalize" + "github.com/VictoriaMetrics/operator/test/e2e/suite" +) + +// createVMClusterAndEnsureOperational creates a VMCluster, sets up its deferred cleanup, and waits for it to become operational. +func createVMClusterAndEnsureOperational(ctx context.Context, k8sClient client.Client, vmcluster *vmv1beta1.VMCluster, ns string) { + DeferCleanup(func() { + Expect(finalize.SafeDelete(ctx, k8sClient, vmcluster)).To(Succeed()) + Eventually(func() error { + return k8sClient.Get(ctx, types.NamespacedName{Name: vmcluster.Name, Namespace: ns}, &vmv1beta1.VMCluster{}) + }, eventualDeletionTimeout).Should(MatchError(k8serrors.IsNotFound, "IsNotFound")) + }) + Expect(k8sClient.Create(ctx, vmcluster)).To(Succeed()) + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, vmcluster, types.NamespacedName{Name: vmcluster.Name, Namespace: ns}) + }, eventualVMDistributedClusterExpandingTimeout).Should(Succeed()) +} + +func verifyOwnerReferences(ctx context.Context, cr *vmv1alpha1.VMDistributedCluster, vmclusters []vmv1beta1.VMCluster, namespace string) { + var fetchedVMCluster vmv1beta1.VMCluster + for _, vmcluster := range vmclusters { + Expect(k8sClient.Get(ctx, types.NamespacedName{Name: vmcluster.Name, Namespace: namespace}, &fetchedVMCluster)).To(Succeed()) + Expect(fetchedVMCluster.GetOwnerReferences()).To(HaveLen(1)) + ownerRef := fetchedVMCluster.GetOwnerReferences()[0] + Expect(ownerRef.Kind).To(Equal("VMDistributedCluster")) + Expect(ownerRef.APIVersion).To(Equal("operator.victoriametrics.com/v1alpha1")) + Expect(ownerRef.Name).To(Equal(cr.Name)) + } +} + +var _ = Describe("e2e vmdistributedcluster", Label("vm", "vmdistributedcluster"), func() { + ctx := context.Background() + + // This env var is required to make vmagent metrics checker ignore errors + // as the test runs outside of the cluster and has no access to pod metrics + os.Setenv("E2E_TEST", "true") + + namespace := fmt.Sprintf("default-%d", GinkgoParallelProcess()) + namespacedName := types.NamespacedName{ + Namespace: namespace, + } + vmAgentName := "new-vmagent" + vmAuthName := "new-vmauth" + + Context("create", func() { + It("should successfully create a VMDistributedCluster with inline VMAgent spec", func() { + By("creating a VMCluster") + vmCluster := &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: "vmcluster-inline-vmauth", + }, + Spec: vmv1beta1.VMClusterSpec{ + RetentionPeriod: "1", + VMStorage: &vmv1beta1.VMStorage{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }, + }, + }, + } + createVMClusterAndEnsureOperational(ctx, k8sClient, vmCluster, namespace) + + By("creating a VMDistributedCluster with inline VMAgent spec") + namespacedName.Name = "distributed-cluster-with-inline-vmagent" + vmAgentName := "inline-vmagent" + cr := &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: namespacedName.Name, + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + VMAgentFlushDeadline: &metav1.Duration{Duration: 1 * time.Second}, + ZoneUpdatePause: &metav1.Duration{Duration: 1 * time.Second}, + ReadyDeadline: &metav1.Duration{Duration: 30 * time.Second}, + VMAgent: vmv1alpha1.VMAgentNameAndSpec{ + Name: vmAgentName, + Spec: &vmv1alpha1.CustomVMAgentSpec{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](2), + }, + }, + }, + VMAuth: vmv1alpha1.VMAuthNameAndSpec{Name: vmAuthName}, + Zones: vmv1alpha1.ZoneSpec{VMClusters: []vmv1alpha1.VMClusterRefOrSpec{ + {Ref: &corev1.LocalObjectReference{Name: vmCluster.Name}}, + }}, + }, + } + DeferCleanup(func() { + Expect(finalize.SafeDelete(ctx, k8sClient, cr)).To(Succeed()) + }) + Expect(k8sClient.Create(ctx, cr)).To(Succeed()) + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmv1alpha1.VMDistributedCluster{}, namespacedName) + }, eventualVMDistributedClusterExpandingTimeout).WithContext(ctx).Should(Succeed()) + + var vmagent vmv1beta1.VMAgent + Eventually(func() error { + return k8sClient.Get(ctx, types.NamespacedName{Name: vmAgentName, Namespace: namespace}, &vmagent) + }, eventualVMDistributedClusterExpandingTimeout).Should(Succeed()) + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmv1beta1.VMAgent{}, types.NamespacedName{Name: vmAgentName, Namespace: namespace}) + }, eventualVMDistributedClusterExpandingTimeout).WithContext(ctx).Should(Succeed()) + Expect(vmagent.Spec.ReplicaCount).To(Equal(ptr.To[int32](2))) + Expect(vmagent.OwnerReferences).To(HaveLen(1)) + Expect(vmagent.OwnerReferences[0].Name).To(Equal(cr.Name)) + Expect(vmagent.OwnerReferences[0].Kind).To(Equal("VMDistributedCluster")) + Expect(vmagent.OwnerReferences[0].UID).To(Equal(cr.UID)) + }) + + It("should successfully create a VMDistributedCluster with inline VMCluster specs", func() { + By("creating a VMDistributedCluster with inline VMCluster specs") + namespacedName.Name = "inline-vmcluster" + cr := &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: namespacedName.Name, + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + VMAgentFlushDeadline: &metav1.Duration{Duration: 1 * time.Second}, + ZoneUpdatePause: &metav1.Duration{Duration: 1 * time.Second}, + ReadyDeadline: &metav1.Duration{Duration: 30 * time.Second}, + VMAgent: vmv1alpha1.VMAgentNameAndSpec{Name: vmAgentName}, + VMAuth: vmv1alpha1.VMAuthNameAndSpec{Name: vmAuthName}, + Zones: vmv1alpha1.ZoneSpec{VMClusters: []vmv1alpha1.VMClusterRefOrSpec{ + { + Name: "inline-cluster-1", + Spec: &vmv1beta1.VMClusterSpec{ + ClusterVersion: "v1.125.0-cluster", + VMStorage: &vmv1beta1.VMStorage{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }, + }, + }, + }, + { + Name: "inline-cluster-2", + Spec: &vmv1beta1.VMClusterSpec{ + ClusterVersion: "v1.126.0-cluster", + VMStorage: &vmv1beta1.VMStorage{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](2), + }, + }, + }, + }, + }}, + }, + } + DeferCleanup(func() { + Expect(finalize.SafeDelete(ctx, k8sClient, cr)).To(Succeed()) + }) + Expect(k8sClient.Create(ctx, cr)).To(Succeed()) + + var inlineVMClusters []vmv1beta1.VMCluster + for _, zone := range cr.Spec.Zones.VMClusters { + inlineVMClusters = append(inlineVMClusters, vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: zone.Name, + Namespace: namespace, + }, + }) + } + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmv1alpha1.VMDistributedCluster{}, namespacedName) + }, eventualVMDistributedClusterExpandingTimeout).WithContext(ctx).Should(Succeed()) + verifyOwnerReferences(ctx, cr, inlineVMClusters, namespace) + + By("waiting for VMDistributedCluster to become operational") + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmv1alpha1.VMDistributedCluster{}, namespacedName) + }, eventualVMDistributedClusterExpandingTimeout).WithContext(ctx).Should(Succeed()) + + By("verifying that the inline VMClusters are created and operational") + var vmCluster1 vmv1beta1.VMCluster + namespacedName := types.NamespacedName{Name: "inline-cluster-1", Namespace: namespace} + Expect(k8sClient.Get(ctx, namespacedName, &vmCluster1)).To(Succeed()) + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmCluster1, namespacedName) + }, eventualVMDistributedClusterExpandingTimeout).Should(Succeed()) + Expect(vmCluster1.Spec.ClusterVersion).To(Equal("v1.125.0-cluster")) + actualReplicaCount := *vmCluster1.Spec.VMStorage.ReplicaCount + Expect(actualReplicaCount).To(Equal(int32(1))) + + var vmCluster2 vmv1beta1.VMCluster + namespacedName = types.NamespacedName{Name: "inline-cluster-2", Namespace: namespace} + Expect(k8sClient.Get(ctx, namespacedName, &vmCluster2)).To(Succeed()) + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmCluster2, namespacedName) + }, eventualVMDistributedClusterExpandingTimeout).Should(Succeed()) + Expect(vmCluster2.Spec.ClusterVersion).To(Equal("v1.126.0-cluster")) + actualReplicaCount = *vmCluster2.Spec.VMStorage.ReplicaCount + Expect(actualReplicaCount).To(Equal(int32(2))) + + DeferCleanup(func() { + Expect(finalize.SafeDelete(ctx, k8sClient, &vmCluster1)).To(Succeed()) + Expect(finalize.SafeDelete(ctx, k8sClient, &vmCluster2)).To(Succeed()) + }) + }) + + It("should successfully create a VMDistributedCluster with inline VMAuth spec", func() { + By("creating a VMCluster") + vmCluster := &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: "vmcluster-inline-vmauth", + }, + Spec: vmv1beta1.VMClusterSpec{ + RetentionPeriod: "1", + VMStorage: &vmv1beta1.VMStorage{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }, + }, + }, + } + createVMClusterAndEnsureOperational(ctx, k8sClient, vmCluster, namespace) + + By("creating a VMDistributedCluster with inline VMAuth spec") + inlineVMAuthName := "inline-vmauth-proxy" + namespacedName.Name = "inline-vmauth-cluster" + cr := &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: namespacedName.Name, + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + VMAgentFlushDeadline: &metav1.Duration{Duration: 1 * time.Second}, + ZoneUpdatePause: &metav1.Duration{Duration: 1 * time.Second}, + ReadyDeadline: &metav1.Duration{Duration: 30 * time.Second}, + VMAgent: vmv1alpha1.VMAgentNameAndSpec{Name: vmAgentName}, + VMAuth: vmv1alpha1.VMAuthNameAndSpec{ + Name: inlineVMAuthName, + Spec: &vmv1beta1.VMAuthLoadBalancerSpec{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }, + CommonDefaultableParams: vmv1beta1.CommonDefaultableParams{ + Port: "8417", + Image: vmv1beta1.Image{ + Repository: "docker.io/victoriametrics/vmauth", + Tag: "latest", + }, + }, + }, + }, + Zones: vmv1alpha1.ZoneSpec{VMClusters: []vmv1alpha1.VMClusterRefOrSpec{ + {Ref: &corev1.LocalObjectReference{Name: vmCluster.Name}}, + }}, + }, + } + DeferCleanup(func() { + Expect(finalize.SafeDelete(ctx, k8sClient, cr)).To(Succeed()) + }) + Expect(k8sClient.Create(ctx, cr)).To(Succeed()) + + By("waiting for VMDistributedCluster to become operational") + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmv1alpha1.VMDistributedCluster{}, namespacedName) + }, eventualVMDistributedClusterExpandingTimeout).WithContext(ctx).Should(Succeed()) + + By("verifying that the inline VMAuth is created and operational") + var createdVMAuthLBDeployment appsv1.Deployment + vmAuthNsn := types.NamespacedName{Name: cr.PrefixedName(vmv1beta1.ClusterComponentBalancer), Namespace: namespace} + Expect(k8sClient.Get(ctx, vmAuthNsn, &createdVMAuthLBDeployment)).To(Succeed()) + Expect(*createdVMAuthLBDeployment.Spec.Replicas).To(Equal(int32(1))) + + By("verifying VMAuth has correct owner reference") + Expect(createdVMAuthLBDeployment.GetOwnerReferences()).To(HaveLen(1)) + ownerRef := createdVMAuthLBDeployment.GetOwnerReferences()[0] + Expect(ownerRef.Kind).To(Equal("VMDistributedCluster")) + Expect(ownerRef.Name).To(Equal(cr.Name)) + }) + + It("should successfully create a VMDistributedCluster with VMCluster references and override spec", func() { + By("creating an initial VMCluster") + initialCluster := &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: "referenced-cluster", + }, + Spec: vmv1beta1.VMClusterSpec{ + ClusterVersion: "v1.126.0-cluster", + VMStorage: &vmv1beta1.VMStorage{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }, + }, + }, + } + createVMClusterAndEnsureOperational(ctx, k8sClient, initialCluster, namespace) + + By("creating a VMDistributedCluster referencing the existing VMCluster with an override spec") + namespacedName.Name = "ref-override-cluster" + cr := &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: namespacedName.Name, + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + VMAgentFlushDeadline: &metav1.Duration{Duration: 1 * time.Second}, + ZoneUpdatePause: &metav1.Duration{Duration: 1 * time.Second}, + ReadyDeadline: &metav1.Duration{Duration: 30 * time.Second}, + VMAgent: vmv1alpha1.VMAgentNameAndSpec{Name: vmAgentName}, + VMAuth: vmv1alpha1.VMAuthNameAndSpec{Name: vmAuthName}, + Zones: vmv1alpha1.ZoneSpec{VMClusters: []vmv1alpha1.VMClusterRefOrSpec{ + { + Ref: &corev1.LocalObjectReference{Name: initialCluster.Name}, + OverrideSpec: &apiextensionsv1.JSON{ + Raw: []byte(`{"retentionPeriod": "10h"}`), + }, + }, + }}, + }, + } + DeferCleanup(func() { + Expect(finalize.SafeDelete(ctx, k8sClient, cr)).To(Succeed()) + }) + Expect(k8sClient.Create(ctx, cr)).To(Succeed()) + + By("waiting for VMDistributedCluster to become operational") + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmv1alpha1.VMDistributedCluster{}, namespacedName) + }, eventualVMDistributedClusterExpandingTimeout).WithContext(ctx).Should(Succeed()) + verifyOwnerReferences(ctx, cr, []vmv1beta1.VMCluster{*initialCluster}, namespace) + + By("verifying that the referenced VMCluster has the override applied") + var updatedCluster vmv1beta1.VMCluster + Expect(k8sClient.Get(ctx, types.NamespacedName{Name: initialCluster.Name, Namespace: namespace}, &updatedCluster)).To(Succeed()) + Expect(updatedCluster.Spec.RetentionPeriod).To(Equal("10h")) + }) + + It("should handle rolling updates with VMAgent configuration changes", func() { + vmCluster1 := &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: "vmcluster-1", + }, + Spec: vmv1beta1.VMClusterSpec{ + RetentionPeriod: "1", + VMStorage: &vmv1beta1.VMStorage{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }, + }, + }, + } + createVMClusterAndEnsureOperational(ctx, k8sClient, vmCluster1, namespace) + + namespacedName.Name = "distributed-agent-upgrade" + vmAgentName := "global-vmagent" + cr := &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: namespacedName.Name, + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + VMAgentFlushDeadline: &metav1.Duration{Duration: 1 * time.Second}, + ZoneUpdatePause: &metav1.Duration{Duration: 1 * time.Second}, + ReadyDeadline: &metav1.Duration{Duration: 30 * time.Second}, + Zones: vmv1alpha1.ZoneSpec{VMClusters: []vmv1alpha1.VMClusterRefOrSpec{ + { + Ref: &corev1.LocalObjectReference{ + Name: vmCluster1.Name, + }, + }, + }}, + VMAgent: vmv1alpha1.VMAgentNameAndSpec{Name: vmAgentName}, + VMAuth: vmv1alpha1.VMAuthNameAndSpec{Name: vmAuthName}, + }, + } + DeferCleanup(func() { + Expect(finalize.SafeDelete(ctx, k8sClient, cr)).To(Succeed()) + }) + Expect(k8sClient.Create(ctx, cr)).To(Succeed()) + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmv1alpha1.VMDistributedCluster{}, namespacedName) + }, eventualVMDistributedClusterExpandingTimeout).WithContext(ctx).Should(Succeed()) + verifyOwnerReferences(ctx, cr, []vmv1beta1.VMCluster{*vmCluster1}, namespace) + + // Update VMAgent + Eventually(func() error { + var obj vmv1alpha1.VMDistributedCluster + if err := k8sClient.Get(ctx, namespacedName, &obj); err != nil { + return err + } + obj.Spec.VMAgent = vmv1alpha1.VMAgentNameAndSpec{Name: vmAgentName} + return k8sClient.Update(ctx, &obj) + }, eventualVMDistributedClusterExpandingTimeout).Should(Succeed()) + + // Wait for VMDistributedCluster to become operational after update + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmv1alpha1.VMDistributedCluster{}, namespacedName) + }, eventualVMDistributedClusterExpandingTimeout).WithContext(ctx).Should(Succeed()) + }) + + It("should wait for VMCluster upgrade completion", func() { + initialVersion := "v1.126.0-cluster" + updateVersion := "v1.127.0-cluster" + + vmCluster1 := &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: "vmcluster-1", + }, + Spec: vmv1beta1.VMClusterSpec{ + ClusterVersion: initialVersion, + VMStorage: &vmv1beta1.VMStorage{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }, + }, + }, + } + createVMClusterAndEnsureOperational(ctx, k8sClient, vmCluster1, namespace) + vmCluster2 := &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: "vmcluster-2", + }, + Spec: vmv1beta1.VMClusterSpec{ + ClusterVersion: initialVersion, + VMStorage: &vmv1beta1.VMStorage{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }, + }, + }, + } + createVMClusterAndEnsureOperational(ctx, k8sClient, vmCluster2, namespace) + vmclusters := []vmv1beta1.VMCluster{*vmCluster1, *vmCluster2} + + namespacedName.Name = "distributed-upgrade" + cr := &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: namespacedName.Name, + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + VMAgentFlushDeadline: &metav1.Duration{Duration: 1 * time.Second}, + ZoneUpdatePause: &metav1.Duration{Duration: 1 * time.Second}, + ReadyDeadline: &metav1.Duration{Duration: 30 * time.Second}, + VMAgent: vmv1alpha1.VMAgentNameAndSpec{ + Name: vmAgentName, + Spec: &vmv1alpha1.CustomVMAgentSpec{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }, + }, + }, + VMAuth: vmv1alpha1.VMAuthNameAndSpec{Name: vmAuthName}, + Zones: vmv1alpha1.ZoneSpec{ + VMClusters: []vmv1alpha1.VMClusterRefOrSpec{ + {Ref: &corev1.LocalObjectReference{ + Name: vmCluster1.Name, + }}, + {Ref: &corev1.LocalObjectReference{ + Name: vmCluster2.Name, + }}, + }, + }, + }, + } + DeferCleanup(func() { + Expect(finalize.SafeDelete(ctx, k8sClient, cr)).To(Succeed()) + }) + Expect(k8sClient.Create(ctx, cr)).To(Succeed()) + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmv1alpha1.VMDistributedCluster{}, namespacedName) + }, eventualVMDistributedClusterExpandingTimeout).WithContext(ctx).Should(Succeed()) + verifyOwnerReferences(ctx, cr, vmclusters, namespace) + + // Apply spec update + Expect(k8sClient.Get(ctx, namespacedName, cr)).To(Succeed()) + cr.Spec.Zones.VMClusters[0].OverrideSpec = &apiextensionsv1.JSON{ + Raw: []byte(fmt.Sprintf(`{"clusterVersion": "%s"}`, updateVersion)), + } + cr.Spec.Zones.VMClusters[1].OverrideSpec = &apiextensionsv1.JSON{ + Raw: []byte(fmt.Sprintf(`{"clusterVersion": "%s"}`, updateVersion)), + } + Expect(k8sClient.Update(ctx, cr)).To(Succeed()) + // Wait for VMDistributedCluster to become operational after its own upgrade + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmv1alpha1.VMDistributedCluster{}, namespacedName) + }, eventualVMDistributedClusterExpandingTimeout).WithContext(ctx).Should(Succeed()) + + // Verify VMDistributedCluster status reflects both clusters are upgraded/operational + var upgradedCluster vmv1alpha1.VMDistributedCluster + Expect(k8sClient.Get(ctx, namespacedName, &upgradedCluster)).To(Succeed()) + + names := []string{ + vmCluster1.Name, + vmCluster2.Name, + } + + // Verify both clusters have desired version set + Eventually(func() error { + vmCluster1 := &vmv1beta1.VMCluster{} + vmCluster2 := &vmv1beta1.VMCluster{} + err := k8sClient.Get(ctx, types.NamespacedName{Name: names[0], Namespace: namespace}, vmCluster1) + if err != nil { + return err + } + err = k8sClient.Get(ctx, types.NamespacedName{Name: names[1], Namespace: namespace}, vmCluster2) + if err != nil { + return err + } + if vmCluster1.Spec.ClusterVersion != updateVersion || vmCluster2.Spec.ClusterVersion != updateVersion { + return fmt.Errorf("expected both clusters to have version %s, but got %s and %s", updateVersion, vmCluster1.Spec.ClusterVersion, vmCluster2.Spec.ClusterVersion) + } + return nil + }, eventualVMDistributedClusterExpandingTimeout).WithContext(ctx).Should(Succeed()) + }) + + It("should skip reconciliation when VMDistributedCluster is paused", func() { + By("creating a VMCluster") + vmCluster := &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: "vmcluster-paused", + }, + Spec: vmv1beta1.VMClusterSpec{ + ClusterVersion: "v1.126.0-cluster", + VMStorage: &vmv1beta1.VMStorage{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }, + }, + }, + } + createVMClusterAndEnsureOperational(ctx, k8sClient, vmCluster, namespace) + + By("creating a VMDistributedCluster") + namespacedName.Name = "distributed-paused" + cr := &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: namespacedName.Name, + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + VMAgentFlushDeadline: &metav1.Duration{Duration: 1 * time.Second}, + ZoneUpdatePause: &metav1.Duration{Duration: 1 * time.Second}, + ReadyDeadline: &metav1.Duration{Duration: 30 * time.Second}, + VMAgent: vmv1alpha1.VMAgentNameAndSpec{Name: vmAgentName}, + VMAuth: vmv1alpha1.VMAuthNameAndSpec{Name: vmAuthName}, + Zones: vmv1alpha1.ZoneSpec{VMClusters: []vmv1alpha1.VMClusterRefOrSpec{ + {Ref: &corev1.LocalObjectReference{Name: vmCluster.Name}}, + }, + }, + }} + DeferCleanup(func() { + Expect(finalize.SafeDelete(ctx, k8sClient, cr)).To(Succeed()) + }) + Expect(k8sClient.Create(ctx, cr)).To(Succeed()) + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmv1alpha1.VMDistributedCluster{}, namespacedName) + }, eventualVMDistributedClusterExpandingTimeout).Should(Succeed()) + verifyOwnerReferences(ctx, cr, []vmv1beta1.VMCluster{*vmCluster}, namespace) + + By("pausing the VMDistributedCluster") + // Re-fetch the latest VMDistributedCluster object to avoid conflict errors + Eventually(func() error { + err := k8sClient.Get(ctx, namespacedName, cr) + if err != nil { + return err + } + cr.Spec.Paused = true + return k8sClient.Update(ctx, cr) + }, eventualVMDistributedClusterExpandingTimeout).Should(Succeed()) + + By("attempting to scale the VMCluster while paused") + Expect(k8sClient.Get(ctx, types.NamespacedName{Name: vmCluster.Name, Namespace: namespace}, vmCluster)).To(Succeed()) + initialReplicas := *vmCluster.Spec.VMStorage.ReplicaCount + + // Re-fetch the latest VMDistributedCluster object to avoid conflict errors + Eventually(func() error { + err := k8sClient.Get(ctx, namespacedName, cr) + if err != nil { + return err + } + cr.Spec.Zones.VMClusters[0].OverrideSpec = &apiextensionsv1.JSON{ + Raw: []byte(fmt.Sprintf(`{"vmstorage":{"replicaCount": %d}}`, initialReplicas+1)), + } + return k8sClient.Update(ctx, cr) + }, eventualVMDistributedClusterExpandingTimeout).Should(Succeed()) + + Consistently(func() int32 { + Expect(k8sClient.Get(ctx, types.NamespacedName{Name: vmCluster.Name, Namespace: namespace}, vmCluster)).To(Succeed()) + return *vmCluster.Spec.VMStorage.ReplicaCount + }, "10s", "1s").Should(Equal(initialReplicas)) + + By("unpausing the VMDistributedCluster") + // Re-fetch the latest VMDistributedCluster object to avoid conflict errors + Eventually(func() error { + err := k8sClient.Get(ctx, namespacedName, cr) + if err != nil { + return err + } + cr.Spec.Paused = false + return k8sClient.Update(ctx, cr) + }, eventualVMDistributedClusterExpandingTimeout).Should(Succeed()) + + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmv1alpha1.VMDistributedCluster{}, namespacedName) + }, eventualVMDistributedClusterExpandingTimeout).Should(Succeed()) + + By("verifying reconciliation resumes after unpausing") + Eventually(func() int32 { + Expect(k8sClient.Get(ctx, types.NamespacedName{Name: vmCluster.Name, Namespace: namespace}, vmCluster)).To(Succeed()) + return *vmCluster.Spec.VMStorage.ReplicaCount + }, eventualDeploymentAppReadyTimeout).Should(Equal(initialReplicas + 1)) + }) + }) + + Context("fail", func() { + DescribeTable("should fail when creating vmdistributedcluster", func(cr *vmv1alpha1.VMDistributedCluster, vmclusters []vmv1beta1.VMCluster) { + for _, vmcluster := range vmclusters { + createVMClusterAndEnsureOperational(ctx, k8sClient, &vmcluster, namespace) + } + + namespacedName.Name = cr.Name + DeferCleanup(func() { + Expect(finalize.SafeDelete(ctx, k8sClient, cr)).To(Succeed()) + }) + Expect(k8sClient.Create(ctx, cr)).To(Succeed()) + Eventually(func() error { + return suite.ExpectObjectStatus(ctx, k8sClient, &vmv1alpha1.VMDistributedCluster{}, namespacedName, vmv1beta1.UpdateStatusFailed) + }, eventualVMDistributedClusterExpandingTimeout).Should(Succeed()) + }, + Entry("with invalid VMCluster", &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: "missing-cluster", + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + VMAgentFlushDeadline: &metav1.Duration{Duration: 1 * time.Second}, + ZoneUpdatePause: &metav1.Duration{Duration: 1 * time.Second}, + ReadyDeadline: &metav1.Duration{Duration: 10 * time.Second}, + VMAgent: vmv1alpha1.VMAgentNameAndSpec{Name: vmAgentName}, + VMAuth: vmv1alpha1.VMAuthNameAndSpec{Name: vmAuthName}, + Zones: vmv1alpha1.ZoneSpec{VMClusters: []vmv1alpha1.VMClusterRefOrSpec{ + { + Ref: &corev1.LocalObjectReference{ + Name: "missing-cluster", + }, + }, + }}, + }, + }, []vmv1beta1.VMCluster{}), + Entry("with zone spec but missing name", &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: "zone-spec-missing-name", + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + VMAgentFlushDeadline: &metav1.Duration{Duration: 1 * time.Second}, + ZoneUpdatePause: &metav1.Duration{Duration: 1 * time.Second}, + ReadyDeadline: &metav1.Duration{Duration: 10 * time.Second}, + VMAgent: vmv1alpha1.VMAgentNameAndSpec{Name: vmAgentName}, + VMAuth: vmv1alpha1.VMAuthNameAndSpec{Name: vmAuthName}, + Zones: vmv1alpha1.ZoneSpec{VMClusters: []vmv1alpha1.VMClusterRefOrSpec{ + { + Spec: &vmv1beta1.VMClusterSpec{ + ClusterVersion: "v1.126.0-cluster", + }, + }, + }}, + }, + }, []vmv1beta1.VMCluster{}), + Entry("with zone missing spec and ref", &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: "zone-missing-spec-ref", + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + VMAgentFlushDeadline: &metav1.Duration{Duration: 1 * time.Second}, + ZoneUpdatePause: &metav1.Duration{Duration: 1 * time.Second}, + ReadyDeadline: &metav1.Duration{Duration: 10 * time.Second}, + VMAgent: vmv1alpha1.VMAgentNameAndSpec{Name: vmAgentName}, + VMAuth: vmv1alpha1.VMAuthNameAndSpec{Name: vmAuthName}, + Zones: vmv1alpha1.ZoneSpec{VMClusters: []vmv1alpha1.VMClusterRefOrSpec{{}}}, + }, + }, []vmv1beta1.VMCluster{}), + Entry("with zone having both spec and ref", &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: "zone-both-spec-ref", + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + VMAgentFlushDeadline: &metav1.Duration{Duration: 1 * time.Second}, + ZoneUpdatePause: &metav1.Duration{Duration: 1 * time.Second}, + ReadyDeadline: &metav1.Duration{Duration: 10 * time.Second}, + VMAgent: vmv1alpha1.VMAgentNameAndSpec{Name: vmAgentName}, + VMAuth: vmv1alpha1.VMAuthNameAndSpec{Name: vmAuthName}, + Zones: vmv1alpha1.ZoneSpec{VMClusters: []vmv1alpha1.VMClusterRefOrSpec{ + { + Ref: &corev1.LocalObjectReference{ + Name: "vmcluster-existing", + }, + Spec: &vmv1beta1.VMClusterSpec{ + ClusterVersion: "v1.126.0-cluster", + }, + }, + }}, + }, + }, []vmv1beta1.VMCluster{}), + ) + }) + + Context("delete", func() { + + It("should delete VMDistributedCluster and remove it from the cluster", func() { + vmCluster := &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: "vmcluster-1", + }, + } + createVMClusterAndEnsureOperational(ctx, k8sClient, vmCluster, namespace) + + namespacedName.Name = "vmdistributedcluster-remove" + cr := &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: namespacedName.Name, + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + VMAgentFlushDeadline: &metav1.Duration{Duration: 1 * time.Second}, + ZoneUpdatePause: &metav1.Duration{Duration: 1 * time.Second}, + ReadyDeadline: &metav1.Duration{Duration: 30 * time.Second}, + VMAgent: vmv1alpha1.VMAgentNameAndSpec{Name: vmAgentName}, + VMAuth: vmv1alpha1.VMAuthNameAndSpec{Name: vmAuthName}, + Zones: vmv1alpha1.ZoneSpec{VMClusters: []vmv1alpha1.VMClusterRefOrSpec{{Ref: &corev1.LocalObjectReference{Name: vmCluster.Name}}}}, + }, + } + DeferCleanup(func() { + Expect(finalize.SafeDelete(ctx, k8sClient, cr)).To(Succeed()) + }) + Expect(k8sClient.Create(ctx, cr)).To(Succeed()) + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmv1alpha1.VMDistributedCluster{}, types.NamespacedName{Name: namespacedName.Name, Namespace: namespace}) + }, eventualVMDistributedClusterExpandingTimeout).WithContext(ctx).Should(Succeed()) + + Expect(finalize.SafeDelete(ctx, k8sClient, cr)).To(Succeed()) + Eventually(func() error { + err := k8sClient.Get(ctx, namespacedName, &vmv1alpha1.VMDistributedCluster{}) + if k8serrors.IsNotFound(err) { + return nil + } + return fmt.Errorf("want NotFound error, got: %w", err) + }, eventualDeletionTimeout, 1).WithContext(ctx).Should(Succeed()) + }) + + It("should remove vmagent created by vmdistributedcluster", func() { + vmCluster := &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: "vmcluster-1", + }, + } + createVMClusterAndEnsureOperational(ctx, k8sClient, vmCluster, namespace) + + namespacedName.Name = "vmdistributedcluster-agent-remove" + vmagentName := namespacedName.Name + "-agent" + cr := &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: namespacedName.Name, + Namespace: namespacedName.Namespace, + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + VMAgentFlushDeadline: &metav1.Duration{Duration: 1 * time.Second}, + ZoneUpdatePause: &metav1.Duration{Duration: 1 * time.Second}, + ReadyDeadline: &metav1.Duration{Duration: 30 * time.Second}, + VMAuth: vmv1alpha1.VMAuthNameAndSpec{Name: vmAuthName}, + VMAgent: vmv1alpha1.VMAgentNameAndSpec{ + Name: vmagentName, + Spec: &vmv1alpha1.CustomVMAgentSpec{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }, + }, + }, + Zones: vmv1alpha1.ZoneSpec{VMClusters: []vmv1alpha1.VMClusterRefOrSpec{{Ref: &corev1.LocalObjectReference{Name: vmCluster.Name}}}}, + }, + } + + By("creating the VMDistributedCluster") + DeferCleanup(func() { + Expect(finalize.SafeDelete(ctx, k8sClient, cr)).To(Succeed()) + }) + Expect(k8sClient.Create(ctx, cr)).To(Succeed()) + + By("waiting for it to become operational") + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmv1alpha1.VMDistributedCluster{}, types.NamespacedName{Name: namespacedName.Name, Namespace: namespace}) + }, eventualVMDistributedClusterExpandingTimeout).WithContext(ctx).Should(Succeed()) + + By("ensuring VMAgent was created") + Expect(k8sClient.Get(ctx, types.NamespacedName{Name: vmagentName, Namespace: cr.Namespace}, &vmv1beta1.VMAgent{})).To(Succeed()) + + By("deleting the VMDistributedCluster") + Expect(k8sClient.Delete(ctx, cr)).To(Succeed()) + + By("ensuring VMAgent is eventually removed") + Eventually(func() bool { + err := k8sClient.Get(ctx, types.NamespacedName{Name: vmagentName, Namespace: cr.Namespace}, &vmv1beta1.VMAgent{}) + return k8serrors.IsNotFound(err) + }, eventualDeletionTimeout).Should(BeTrue()) + }) + + It("should remove vmauth created by vmdistributedcluster", func() { + vmCluster := &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: "vmcluster-1", + }, + } + createVMClusterAndEnsureOperational(ctx, k8sClient, vmCluster, namespace) + + namespacedName.Name = "vmdistributedcluster-vmauth-remove" + vmauthName := namespacedName.Name + "-vmauth" + cr := &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: namespacedName.Name, + Namespace: namespace, + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + VMAgentFlushDeadline: &metav1.Duration{Duration: 1 * time.Second}, + ZoneUpdatePause: &metav1.Duration{Duration: 1 * time.Second}, + ReadyDeadline: &metav1.Duration{Duration: 30 * time.Second}, + VMAuth: vmv1alpha1.VMAuthNameAndSpec{ + Name: vmauthName, + Spec: &vmv1beta1.VMAuthLoadBalancerSpec{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }, + CommonDefaultableParams: vmv1beta1.CommonDefaultableParams{ + Port: "8417", + Image: vmv1beta1.Image{ + Repository: "docker.io/victoriametrics/vmauth", + Tag: "latest", + }, + }, + }, + }, + VMAgent: vmv1alpha1.VMAgentNameAndSpec{Name: vmAgentName}, + Zones: vmv1alpha1.ZoneSpec{VMClusters: []vmv1alpha1.VMClusterRefOrSpec{{Ref: &corev1.LocalObjectReference{Name: vmCluster.Name}}}}, + }, + } + + By("creating the VMDistributedCluster") + Expect(k8sClient.Create(ctx, cr)).To(Succeed()) + DeferCleanup(func() { + Expect(finalize.SafeDelete(ctx, k8sClient, cr)).To(Succeed()) + }) + + By("waiting for it to become operational") + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmv1alpha1.VMDistributedCluster{}, types.NamespacedName{Name: namespacedName.Name, Namespace: namespace}) + }, eventualVMDistributedClusterExpandingTimeout).WithContext(ctx).Should(Succeed()) + + By("ensuring VMAuth was created") + vmAuthDeployName := types.NamespacedName{Name: cr.PrefixedName(vmv1beta1.ClusterComponentBalancer), Namespace: namespace} + Expect(k8sClient.Get(ctx, vmAuthDeployName, &appsv1.Deployment{})).To(Succeed()) + + By("deleting the VMDistributedCluster") + Expect(k8sClient.Delete(ctx, cr)).To(Succeed()) + + By("ensuring VMAuth is eventually removed") + Eventually(func() bool { + err := k8sClient.Get(ctx, vmAuthDeployName, &appsv1.Deployment{}) + return k8serrors.IsNotFound(err) + }, eventualDeletionTimeout).Should(BeTrue()) + }) + + It("should remove vmclusters created by vmdistributedcluster", func() { + namespacedName.Name = "vmdistributed-vmcluster-removal" + vmc1Name := namespacedName.Name + "-c1" + vmc2Name := namespacedName.Name + "-c2" + cr := &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: namespacedName.Name, + Namespace: namespace, + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + VMAgentFlushDeadline: &metav1.Duration{Duration: 1 * time.Second}, + ZoneUpdatePause: &metav1.Duration{Duration: 1 * time.Second}, + ReadyDeadline: &metav1.Duration{Duration: 30 * time.Second}, + VMAgent: vmv1alpha1.VMAgentNameAndSpec{Name: vmAgentName}, + VMAuth: vmv1alpha1.VMAuthNameAndSpec{Name: vmAuthName}, + Zones: vmv1alpha1.ZoneSpec{ + VMClusters: []vmv1alpha1.VMClusterRefOrSpec{ + { + Name: vmc1Name, + Spec: &vmv1beta1.VMClusterSpec{ + VMSelect: &vmv1beta1.VMSelect{CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }}, + VMInsert: &vmv1beta1.VMInsert{CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }}, + VMStorage: &vmv1beta1.VMStorage{CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }}, + }, + }, + { + Name: vmc2Name, + Spec: &vmv1beta1.VMClusterSpec{ + VMSelect: &vmv1beta1.VMSelect{CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }}, + VMInsert: &vmv1beta1.VMInsert{CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }}, + VMStorage: &vmv1beta1.VMStorage{CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }}, + }, + }, + }, + }, + }, + } + + By("creating the VMDistributedCluster") + Expect(k8sClient.Create(ctx, cr)).To(Succeed()) + DeferCleanup(func() { + Expect(finalize.SafeDelete(ctx, k8sClient, cr)).To(Succeed()) + }) + + By("waiting for it to become operational") + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmv1alpha1.VMDistributedCluster{}, types.NamespacedName{Name: namespacedName.Name, Namespace: namespace}) + }, eventualVMDistributedClusterExpandingTimeout).WithContext(ctx).Should(Succeed()) + + vmclusters := []string{vmc1Name, vmc2Name} + By("ensuring VMClusters were created") + for _, vmclusterName := range vmclusters { + Expect(k8sClient.Get(ctx, types.NamespacedName{Name: vmclusterName, Namespace: namespace}, &vmv1beta1.VMCluster{})).To(Succeed()) + } + + By("deleting the VMDistributedCluster") + Expect(k8sClient.Delete(ctx, cr)).To(Succeed()) + + By("ensuring VMClusters are eventually removed") + for _, vmclusterName := range vmclusters { + Eventually(func() bool { + err := k8sClient.Get(ctx, types.NamespacedName{Name: vmclusterName, Namespace: namespace}, &vmv1beta1.VMCluster{}) + return k8serrors.IsNotFound(err) + }, eventualDeletionTimeout).Should(BeTrue()) + } + }) + }) + + Describe("GlobalOverrideSpec", func() { + It("should apply global overrides before cluster-specific overrides", func() { + By("creating initial VMClusters") + vmCluster1 := &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: "vmcluster-global-1", + }, + Spec: vmv1beta1.VMClusterSpec{ + ClusterVersion: "v1.126.0-cluster", + RetentionPeriod: "30d", + VMStorage: &vmv1beta1.VMStorage{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }, + }, + }, + } + createVMClusterAndEnsureOperational(ctx, k8sClient, vmCluster1, namespace) + + vmCluster2 := &vmv1beta1.VMCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: "vmcluster-global-2", + }, + Spec: vmv1beta1.VMClusterSpec{ + ClusterVersion: "v1.126.0-cluster", + RetentionPeriod: "30d", + VMStorage: &vmv1beta1.VMStorage{ + CommonApplicationDeploymentParams: vmv1beta1.CommonApplicationDeploymentParams{ + ReplicaCount: ptr.To[int32](1), + }, + }, + }, + } + createVMClusterAndEnsureOperational(ctx, k8sClient, vmCluster2, namespace) + + By("creating a VMDistributedCluster with GlobalOverrideSpec and cluster-specific overrides") + namespacedName.Name = "global-override-cluster" + cr := &vmv1alpha1.VMDistributedCluster{ + ObjectMeta: metav1.ObjectMeta{ + Namespace: namespace, + Name: namespacedName.Name, + }, + Spec: vmv1alpha1.VMDistributedClusterSpec{ + VMAgentFlushDeadline: &metav1.Duration{Duration: 1 * time.Second}, + ZoneUpdatePause: &metav1.Duration{Duration: 1 * time.Second}, + ReadyDeadline: &metav1.Duration{Duration: 30 * time.Second}, + VMAgent: vmv1alpha1.VMAgentNameAndSpec{Name: vmAgentName}, + VMAuth: vmv1alpha1.VMAuthNameAndSpec{Name: vmAuthName}, + Zones: vmv1alpha1.ZoneSpec{ + GlobalOverrideSpec: &apiextensionsv1.JSON{ + Raw: []byte(`{"clusterVersion": "v1.127.0-cluster", "retentionPeriod": "60d"}`), + }, + VMClusters: []vmv1alpha1.VMClusterRefOrSpec{ + { + Ref: &corev1.LocalObjectReference{Name: vmCluster1.Name}, + OverrideSpec: &apiextensionsv1.JSON{ + Raw: []byte(`{"vmStorage": {"replicaCount": 2}}`), + }, + }, + { + Ref: &corev1.LocalObjectReference{Name: vmCluster2.Name}, + OverrideSpec: &apiextensionsv1.JSON{ + Raw: []byte(`{"vmStorage": {"replicaCount": 3}}`), + }, + }, + }, + }, + }, + } + DeferCleanup(func() { + Expect(finalize.SafeDelete(ctx, k8sClient, cr)).To(Succeed()) + }) + Expect(k8sClient.Create(ctx, cr)).To(Succeed()) + + By("waiting for VMDistributedCluster to become operational") + Eventually(func() error { + return expectObjectStatusOperational(ctx, k8sClient, &vmv1alpha1.VMDistributedCluster{}, namespacedName) + }, eventualVMDistributedClusterExpandingTimeout).WithContext(ctx).Should(Succeed()) + verifyOwnerReferences(ctx, cr, []vmv1beta1.VMCluster{*vmCluster1, *vmCluster2}, namespace) + + By("verifying that both VMClusters have the global override applied") + var updatedCluster1, updatedCluster2 vmv1beta1.VMCluster + Expect(k8sClient.Get(ctx, types.NamespacedName{Name: vmCluster1.Name, Namespace: namespace}, &updatedCluster1)).To(Succeed()) + Expect(k8sClient.Get(ctx, types.NamespacedName{Name: vmCluster2.Name, Namespace: namespace}, &updatedCluster2)).To(Succeed()) + + // Global overrides should be applied + Expect(updatedCluster1.Spec.ClusterVersion).To(Equal("v1.127.0-cluster")) + Expect(updatedCluster1.Spec.RetentionPeriod).To(Equal("60d")) + Expect(updatedCluster2.Spec.ClusterVersion).To(Equal("v1.127.0-cluster")) + Expect(updatedCluster2.Spec.RetentionPeriod).To(Equal("60d")) + + // Cluster-specific overrides should be applied after global overrides + Expect(*updatedCluster1.Spec.VMStorage.ReplicaCount).To(Equal(int32(2))) + Expect(*updatedCluster2.Spec.VMStorage.ReplicaCount).To(Equal(int32(3))) + }) + }) +})