// Copyright (c) 2023 Volvo Car Corporation
// SPDX-License-Identifier: Apache-2.0

// Code generated by lingon. EDIT AS MUCH AS YOU LIKE.

package vmk8s

import (
	vmo "github.com/VictoriaMetrics/operator/api/operator/v1"
)

var CadvisorNodeScrape = &v1.VMNodeScrape{
	TypeMeta:   TypeVMNodeScrape,
	ObjectMeta: Single.ObjectMetaNameSuffix("cadvisor-nodescrape"),
	Spec: vmo.VMNodeScrapeSpec{
		BearerTokenFile: "/var/run/secrets/kubernetes.io/serviceaccount/token",
		HonorLabels:     true,
		Interval:        "30s",
		MetricRelabelConfigs: []*vmo.RelabelConfig{
			{
				Action: "labeldrop",
				Regex:  "(uid)",
			}, {
				Action: "labeldrop",
				Regex:  "(id|name)",
			}, {
				Action:                 "drop",
				Regex:                  "(rest_client_request_duration_seconds_bucket|rest_client_request_duration_seconds_sum|rest_client_request_duration_seconds_count)",
				SourceLabels:           []string{"__name__"},
				UnderScoreSourceLabels: []string{"__name__"},
			},
		},
		Path: "/metrics/cadvisor",
		RelabelConfigs: []*vmo.RelabelConfig{
			{
				Action: "labelmap",
				Regex:  "__meta_kubernetes_node_label_(.+)",
			}, {
				SourceLabels:           []string{"__metrics_path__"},
				TargetLabel:            "metrics_path",
				UnderScoreSourceLabels: []string{"__metrics_path__"},
				UnderScoreTargetLabel:  "metrics_path",
			}, {
				Replacement:           "kubelet",
				TargetLabel:           "job",
				UnderScoreTargetLabel: "job",
			},
		},
		Scheme:        "https",
		ScrapeTimeout: "5s",
		TLSConfig: &vmo.TLSConfig{
			CAFile:             "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt",
			InsecureSkipVerify: true,
		},
	},
}

var KubeletNodeScrape = &vmo.VMNodeScrape{
	TypeMeta:   TypeVMNodeScrape,
	ObjectMeta: Single.ObjectMetaNameSuffix("kubelet-nodescrape"),
	Spec: vmo.VMNodeScrapeSpec{
		BearerTokenFile: "/var/run/secrets/kubernetes.io/serviceaccount/token",
		HonorLabels:     true,
		Interval:        "30s",
		MetricRelabelConfigs: []*vmo.RelabelConfig{
			{
				Action: "labeldrop",
				Regex:  "(uid)",
			}, {
				Action: "labeldrop",
				Regex:  "(id|name)",
			}, {
				Action:                 "drop",
				Regex:                  "(rest_client_request_duration_seconds_bucket|rest_client_request_duration_seconds_sum|rest_client_request_duration_seconds_count)",
				SourceLabels:           []string{"__name__"},
				UnderScoreSourceLabels: []string{"__name__"},
			},
		},
		RelabelConfigs: []*vmo.RelabelConfig{
			{
				Action: "labelmap",
				Regex:  "__meta_kubernetes_node_label_(.+)",
			}, {
				SourceLabels:           []string{"__metrics_path__"},
				TargetLabel:            "metrics_path",
				UnderScoreSourceLabels: []string{"__metrics_path__"},
				UnderScoreTargetLabel:  "metrics_path",
			}, {
				Replacement:           "kubelet",
				TargetLabel:           "job",
				UnderScoreTargetLabel: "job",
			},
		},
		Scheme:        "https",
		ScrapeTimeout: "5s",
		TLSConfig: &vmo.TLSConfig{
			CAFile:             "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt",
			InsecureSkipVerify: true,
		},
	},
}

var ProbesNodeScrape = &vmo.VMNodeScrape{
	TypeMeta:   TypeVMNodeScrape,
	ObjectMeta: Single.ObjectMetaNameSuffix("probes"),
	Spec: vmo.VMNodeScrapeSpec{
		BearerTokenFile: "/var/run/secrets/kubernetes.io/serviceaccount/token",
		HonorLabels:     true,
		Interval:        "30s",
		MetricRelabelConfigs: []*vmo.RelabelConfig{
			{
				Action: "labeldrop",
				Regex:  "(uid)",
			}, {
				Action: "labeldrop",
				Regex:  "(id|name)",
			}, {
				Action:                 "drop",
				Regex:                  "(rest_client_request_duration_seconds_bucket|rest_client_request_duration_seconds_sum|rest_client_request_duration_seconds_count)",
				SourceLabels:           []string{"__name__"},
				UnderScoreSourceLabels: []string{"__name__"},
			},
		},
		Path: "/metrics/probes",
		RelabelConfigs: []*vmo.RelabelConfig{
			{
				Action: "labelmap",
				Regex:  "__meta_kubernetes_node_label_(.+)",
			}, {
				SourceLabels:           []string{"__metrics_path__"},
				TargetLabel:            "metrics_path",
				UnderScoreSourceLabels: []string{"__metrics_path__"},
				UnderScoreTargetLabel:  "metrics_path",
			}, {
				Replacement:           "kubelet",
				TargetLabel:           "job",
				UnderScoreTargetLabel: "job",
			},
		},
		Scheme:        "https",
		ScrapeTimeout: "5s",
		TLSConfig: &vmo.TLSConfig{
			CAFile:             "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt",
			InsecureSkipVerify: true,
		},
	},
}
