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

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

package promstack

import (
	v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

var KubePromtheusStackGrafanaServiceMonitor = &v1.ServiceMonitor{
	ObjectMeta: metav1.ObjectMeta{
		Labels: map[string]string{
			"app.kubernetes.io/instance":   "kube-promtheus-stack",
			"app.kubernetes.io/managed-by": "Helm",
			"app.kubernetes.io/name":       "grafana",
			"app.kubernetes.io/version":    "9.5.3",
			"helm.sh/chart":                "grafana-6.57.3",
		},
		Name:      "kube-promtheus-stack-grafana",
		Namespace: "monitoring",
	},
	Spec: v1.ServiceMonitorSpec{
		Endpoints: []v1.Endpoint{{
			HonorLabels:   true,
			Path:          "/metrics",
			Port:          "http-web",
			Scheme:        "http",
			ScrapeTimeout: v1.Duration("30s"),
		}},
		JobLabel:          "kube-promtheus-stack",
		NamespaceSelector: v1.NamespaceSelector{MatchNames: []string{"monitoring"}},
		Selector: metav1.LabelSelector{MatchLabels: map[string]string{
			"app.kubernetes.io/instance": "kube-promtheus-stack",
			"app.kubernetes.io/name":     "grafana",
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "monitoring.coreos.com/v1",
		Kind:       "ServiceMonitor",
	},
}

var KubePromtheusStackKubeAlertmanagerServiceMonitor = &v1.ServiceMonitor{
	ObjectMeta: metav1.ObjectMeta{
		Labels: map[string]string{
			"app":                          "kube-prometheus-stack-alertmanager",
			"app.kubernetes.io/instance":   "kube-promtheus-stack",
			"app.kubernetes.io/managed-by": "Helm",
			"app.kubernetes.io/part-of":    "kube-prometheus-stack",
			"app.kubernetes.io/version":    "47.0.0",
			"chart":                        "kube-prometheus-stack-47.0.0",
			"heritage":                     "Helm",
			"release":                      "kube-promtheus-stack",
		},
		Name:      "kube-promtheus-stack-kube-alertmanager",
		Namespace: "monitoring",
	},
	Spec: v1.ServiceMonitorSpec{
		Endpoints: []v1.Endpoint{{
			EnableHttp2: P(true),
			Path:        "/metrics",
			Port:        "http-web",
		}},
		NamespaceSelector: v1.NamespaceSelector{MatchNames: []string{"monitoring"}},
		Selector: metav1.LabelSelector{MatchLabels: map[string]string{
			"app":          "kube-prometheus-stack-alertmanager",
			"release":      "kube-promtheus-stack",
			"self-monitor": "true",
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "monitoring.coreos.com/v1",
		Kind:       "ServiceMonitor",
	},
}

var KubePromtheusStackKubeApiserverServiceMonitor = &v1.ServiceMonitor{
	ObjectMeta: metav1.ObjectMeta{
		Labels: map[string]string{
			"app":                          "kube-prometheus-stack-apiserver",
			"app.kubernetes.io/instance":   "kube-promtheus-stack",
			"app.kubernetes.io/managed-by": "Helm",
			"app.kubernetes.io/part-of":    "kube-prometheus-stack",
			"app.kubernetes.io/version":    "47.0.0",
			"chart":                        "kube-prometheus-stack-47.0.0",
			"heritage":                     "Helm",
			"release":                      "kube-promtheus-stack",
		},
		Name:      "kube-promtheus-stack-kube-apiserver",
		Namespace: "monitoring",
	},
	Spec: v1.ServiceMonitorSpec{
		Endpoints: []v1.Endpoint{{
			BearerTokenFile: "/var/run/secrets/kubernetes.io/serviceaccount/token",
			MetricRelabelConfigs: []v1.RelabelConfig{{
				Action:       "drop",
				Regex:        "apiserver_request_duration_seconds_bucket;(0.15|0.2|0.3|0.35|0.4|0.45|0.6|0.7|0.8|0.9|1.25|1.5|1.75|2|3|3.5|4|4.5|6|7|8|9|15|25|40|50)",
				SourceLabels: []v1.LabelName{v1.LabelName("__name__"), v1.LabelName("le")},
			}},
			Port:   "https",
			Scheme: "https",
			TLSConfig: &v1.TLSConfig{
				CAFile:        "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt",
				SafeTLSConfig: v1.SafeTLSConfig{ServerName: P("kubernetes")},
			},
		}},
		JobLabel:          "component",
		NamespaceSelector: v1.NamespaceSelector{MatchNames: []string{"default"}},
		Selector: metav1.LabelSelector{MatchLabels: map[string]string{
			"component": "apiserver",
			"provider":  "kubernetes",
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "monitoring.coreos.com/v1",
		Kind:       "ServiceMonitor",
	},
}

var KubePromtheusStackKubeCorednsServiceMonitor = &v1.ServiceMonitor{
	ObjectMeta: metav1.ObjectMeta{
		Labels: map[string]string{
			"app":                          "kube-prometheus-stack-coredns",
			"app.kubernetes.io/instance":   "kube-promtheus-stack",
			"app.kubernetes.io/managed-by": "Helm",
			"app.kubernetes.io/part-of":    "kube-prometheus-stack",
			"app.kubernetes.io/version":    "47.0.0",
			"chart":                        "kube-prometheus-stack-47.0.0",
			"heritage":                     "Helm",
			"release":                      "kube-promtheus-stack",
		},
		Name:      "kube-promtheus-stack-kube-coredns",
		Namespace: "monitoring",
	},
	Spec: v1.ServiceMonitorSpec{
		Endpoints: []v1.Endpoint{{
			BearerTokenFile: "/var/run/secrets/kubernetes.io/serviceaccount/token",
			Port:            "http-metrics",
		}},
		JobLabel:          "jobLabel",
		NamespaceSelector: v1.NamespaceSelector{MatchNames: []string{"kube-system"}},
		Selector: metav1.LabelSelector{MatchLabels: map[string]string{
			"app":     "kube-prometheus-stack-coredns",
			"release": "kube-promtheus-stack",
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "monitoring.coreos.com/v1",
		Kind:       "ServiceMonitor",
	},
}

var KubePromtheusStackKubeKubeControllerManagerServiceMonitor = &v1.ServiceMonitor{
	ObjectMeta: metav1.ObjectMeta{
		Labels: map[string]string{
			"app":                          "kube-prometheus-stack-kube-controller-manager",
			"app.kubernetes.io/instance":   "kube-promtheus-stack",
			"app.kubernetes.io/managed-by": "Helm",
			"app.kubernetes.io/part-of":    "kube-prometheus-stack",
			"app.kubernetes.io/version":    "47.0.0",
			"chart":                        "kube-prometheus-stack-47.0.0",
			"heritage":                     "Helm",
			"release":                      "kube-promtheus-stack",
		},
		Name:      "kube-promtheus-stack-kube-kube-controller-manager",
		Namespace: "monitoring",
	},
	Spec: v1.ServiceMonitorSpec{
		Endpoints: []v1.Endpoint{{
			BearerTokenFile: "/var/run/secrets/kubernetes.io/serviceaccount/token",
			Port:            "http-metrics",
			Scheme:          "https",
			TLSConfig: &v1.TLSConfig{
				CAFile:        "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt",
				SafeTLSConfig: v1.SafeTLSConfig{InsecureSkipVerify: P(true)},
			},
		}},
		JobLabel:          "jobLabel",
		NamespaceSelector: v1.NamespaceSelector{MatchNames: []string{"kube-system"}},
		Selector: metav1.LabelSelector{MatchLabels: map[string]string{
			"app":     "kube-prometheus-stack-kube-controller-manager",
			"release": "kube-promtheus-stack",
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "monitoring.coreos.com/v1",
		Kind:       "ServiceMonitor",
	},
}

var KubePromtheusStackKubeKubeEtcdServiceMonitor = &v1.ServiceMonitor{
	ObjectMeta: metav1.ObjectMeta{
		Labels: map[string]string{
			"app":                          "kube-prometheus-stack-kube-etcd",
			"app.kubernetes.io/instance":   "kube-promtheus-stack",
			"app.kubernetes.io/managed-by": "Helm",
			"app.kubernetes.io/part-of":    "kube-prometheus-stack",
			"app.kubernetes.io/version":    "47.0.0",
			"chart":                        "kube-prometheus-stack-47.0.0",
			"heritage":                     "Helm",
			"release":                      "kube-promtheus-stack",
		},
		Name:      "kube-promtheus-stack-kube-kube-etcd",
		Namespace: "monitoring",
	},
	Spec: v1.ServiceMonitorSpec{
		Endpoints: []v1.Endpoint{{
			BearerTokenFile: "/var/run/secrets/kubernetes.io/serviceaccount/token",
			Port:            "http-metrics",
		}},
		JobLabel:          "jobLabel",
		NamespaceSelector: v1.NamespaceSelector{MatchNames: []string{"kube-system"}},
		Selector: metav1.LabelSelector{MatchLabels: map[string]string{
			"app":     "kube-prometheus-stack-kube-etcd",
			"release": "kube-promtheus-stack",
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "monitoring.coreos.com/v1",
		Kind:       "ServiceMonitor",
	},
}

var KubePromtheusStackKubeKubeProxyServiceMonitor = &v1.ServiceMonitor{
	ObjectMeta: metav1.ObjectMeta{
		Labels: map[string]string{
			"app":                          "kube-prometheus-stack-kube-proxy",
			"app.kubernetes.io/instance":   "kube-promtheus-stack",
			"app.kubernetes.io/managed-by": "Helm",
			"app.kubernetes.io/part-of":    "kube-prometheus-stack",
			"app.kubernetes.io/version":    "47.0.0",
			"chart":                        "kube-prometheus-stack-47.0.0",
			"heritage":                     "Helm",
			"release":                      "kube-promtheus-stack",
		},
		Name:      "kube-promtheus-stack-kube-kube-proxy",
		Namespace: "monitoring",
	},
	Spec: v1.ServiceMonitorSpec{
		Endpoints: []v1.Endpoint{{
			BearerTokenFile: "/var/run/secrets/kubernetes.io/serviceaccount/token",
			Port:            "http-metrics",
		}},
		JobLabel:          "jobLabel",
		NamespaceSelector: v1.NamespaceSelector{MatchNames: []string{"kube-system"}},
		Selector: metav1.LabelSelector{MatchLabels: map[string]string{
			"app":     "kube-prometheus-stack-kube-proxy",
			"release": "kube-promtheus-stack",
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "monitoring.coreos.com/v1",
		Kind:       "ServiceMonitor",
	},
}

var KubePromtheusStackKubeKubeSchedulerServiceMonitor = &v1.ServiceMonitor{
	ObjectMeta: metav1.ObjectMeta{
		Labels: map[string]string{
			"app":                          "kube-prometheus-stack-kube-scheduler",
			"app.kubernetes.io/instance":   "kube-promtheus-stack",
			"app.kubernetes.io/managed-by": "Helm",
			"app.kubernetes.io/part-of":    "kube-prometheus-stack",
			"app.kubernetes.io/version":    "47.0.0",
			"chart":                        "kube-prometheus-stack-47.0.0",
			"heritage":                     "Helm",
			"release":                      "kube-promtheus-stack",
		},
		Name:      "kube-promtheus-stack-kube-kube-scheduler",
		Namespace: "monitoring",
	},
	Spec: v1.ServiceMonitorSpec{
		Endpoints: []v1.Endpoint{{
			BearerTokenFile: "/var/run/secrets/kubernetes.io/serviceaccount/token",
			Port:            "http-metrics",
			Scheme:          "https",
			TLSConfig: &v1.TLSConfig{
				CAFile:        "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt",
				SafeTLSConfig: v1.SafeTLSConfig{InsecureSkipVerify: P(true)},
			},
		}},
		JobLabel:          "jobLabel",
		NamespaceSelector: v1.NamespaceSelector{MatchNames: []string{"kube-system"}},
		Selector: metav1.LabelSelector{MatchLabels: map[string]string{
			"app":     "kube-prometheus-stack-kube-scheduler",
			"release": "kube-promtheus-stack",
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "monitoring.coreos.com/v1",
		Kind:       "ServiceMonitor",
	},
}

var KubePromtheusStackKubeKubeletServiceMonitor = &v1.ServiceMonitor{
	ObjectMeta: metav1.ObjectMeta{
		Labels: map[string]string{
			"app":                          "kube-prometheus-stack-kubelet",
			"app.kubernetes.io/instance":   "kube-promtheus-stack",
			"app.kubernetes.io/managed-by": "Helm",
			"app.kubernetes.io/part-of":    "kube-prometheus-stack",
			"app.kubernetes.io/version":    "47.0.0",
			"chart":                        "kube-prometheus-stack-47.0.0",
			"heritage":                     "Helm",
			"release":                      "kube-promtheus-stack",
		},
		Name:      "kube-promtheus-stack-kube-kubelet",
		Namespace: "monitoring",
	},
	Spec: v1.ServiceMonitorSpec{
		Endpoints: []v1.Endpoint{{
			BearerTokenFile: "/var/run/secrets/kubernetes.io/serviceaccount/token",
			HonorLabels:     true,
			Port:            "https-metrics",
			RelabelConfigs: []v1.RelabelConfig{{
				Action:       "replace",
				SourceLabels: []v1.LabelName{v1.LabelName("__metrics_path__")},
				TargetLabel:  "metrics_path",
			}},
			Scheme: "https",
			TLSConfig: &v1.TLSConfig{
				CAFile:        "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt",
				SafeTLSConfig: v1.SafeTLSConfig{InsecureSkipVerify: P(true)},
			},
		}, {
			BearerTokenFile: "/var/run/secrets/kubernetes.io/serviceaccount/token",
			HonorLabels:     true,
			MetricRelabelConfigs: []v1.RelabelConfig{{
				Action:       "drop",
				Regex:        "container_cpu_(cfs_throttled_seconds_total|load_average_10s|system_seconds_total|user_seconds_total)",
				SourceLabels: []v1.LabelName{v1.LabelName("__name__")},
			}, {
				Action:       "drop",
				Regex:        "container_fs_(io_current|io_time_seconds_total|io_time_weighted_seconds_total|reads_merged_total|sector_reads_total|sector_writes_total|writes_merged_total)",
				SourceLabels: []v1.LabelName{v1.LabelName("__name__")},
			}, {
				Action:       "drop",
				Regex:        "container_memory_(mapped_file|swap)",
				SourceLabels: []v1.LabelName{v1.LabelName("__name__")},
			}, {
				Action:       "drop",
				Regex:        "container_(file_descriptors|tasks_state|threads_max)",
				SourceLabels: []v1.LabelName{v1.LabelName("__name__")},
			}, {
				Action:       "drop",
				Regex:        "container_spec.*",
				SourceLabels: []v1.LabelName{v1.LabelName("__name__")},
			}, {
				Action:       "drop",
				Regex:        ".+;",
				SourceLabels: []v1.LabelName{v1.LabelName("id"), v1.LabelName("pod")},
			}},
			Path: "/metrics/cadvisor",
			Port: "https-metrics",
			RelabelConfigs: []v1.RelabelConfig{{
				Action:       "replace",
				SourceLabels: []v1.LabelName{v1.LabelName("__metrics_path__")},
				TargetLabel:  "metrics_path",
			}},
			Scheme: "https",
			TLSConfig: &v1.TLSConfig{
				CAFile:        "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt",
				SafeTLSConfig: v1.SafeTLSConfig{InsecureSkipVerify: P(true)},
			},
		}, {
			BearerTokenFile: "/var/run/secrets/kubernetes.io/serviceaccount/token",
			HonorLabels:     true,
			Path:            "/metrics/probes",
			Port:            "https-metrics",
			RelabelConfigs: []v1.RelabelConfig{{
				Action:       "replace",
				SourceLabels: []v1.LabelName{v1.LabelName("__metrics_path__")},
				TargetLabel:  "metrics_path",
			}},
			Scheme: "https",
			TLSConfig: &v1.TLSConfig{
				CAFile:        "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt",
				SafeTLSConfig: v1.SafeTLSConfig{InsecureSkipVerify: P(true)},
			},
		}},
		JobLabel:          "k8s-app",
		NamespaceSelector: v1.NamespaceSelector{MatchNames: []string{"kube-system"}},
		Selector: metav1.LabelSelector{MatchLabels: map[string]string{
			"app.kubernetes.io/name": "kubelet",
			"k8s-app":                "kubelet",
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "monitoring.coreos.com/v1",
		Kind:       "ServiceMonitor",
	},
}

var KubePromtheusStackKubeOperatorServiceMonitor = &v1.ServiceMonitor{
	ObjectMeta: metav1.ObjectMeta{
		Labels: map[string]string{
			"app":                          "kube-prometheus-stack-operator",
			"app.kubernetes.io/instance":   "kube-promtheus-stack",
			"app.kubernetes.io/managed-by": "Helm",
			"app.kubernetes.io/part-of":    "kube-prometheus-stack",
			"app.kubernetes.io/version":    "47.0.0",
			"chart":                        "kube-prometheus-stack-47.0.0",
			"heritage":                     "Helm",
			"release":                      "kube-promtheus-stack",
		},
		Name:      "kube-promtheus-stack-kube-operator",
		Namespace: "monitoring",
	},
	Spec: v1.ServiceMonitorSpec{
		Endpoints: []v1.Endpoint{{
			HonorLabels: true,
			Port:        "https",
			Scheme:      "https",
			TLSConfig: &v1.TLSConfig{SafeTLSConfig: v1.SafeTLSConfig{
				CA: v1.SecretOrConfigMap{Secret: &corev1.SecretKeySelector{
					Key:                  "ca",
					LocalObjectReference: corev1.LocalObjectReference{Name: "kube-promtheus-stack-kube-admission"},
				}},
				ServerName: P("kube-promtheus-stack-kube-operator"),
			}},
		}},
		NamespaceSelector: v1.NamespaceSelector{MatchNames: []string{"monitoring"}},
		Selector: metav1.LabelSelector{MatchLabels: map[string]string{
			"app":     "kube-prometheus-stack-operator",
			"release": "kube-promtheus-stack",
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "monitoring.coreos.com/v1",
		Kind:       "ServiceMonitor",
	},
}

var KubePromtheusStackKubePrometheusServiceMonitor = &v1.ServiceMonitor{
	ObjectMeta: metav1.ObjectMeta{
		Labels: map[string]string{
			"app":                          "kube-prometheus-stack-prometheus",
			"app.kubernetes.io/instance":   "kube-promtheus-stack",
			"app.kubernetes.io/managed-by": "Helm",
			"app.kubernetes.io/part-of":    "kube-prometheus-stack",
			"app.kubernetes.io/version":    "47.0.0",
			"chart":                        "kube-prometheus-stack-47.0.0",
			"heritage":                     "Helm",
			"release":                      "kube-promtheus-stack",
		},
		Name:      "kube-promtheus-stack-kube-prometheus",
		Namespace: "monitoring",
	},
	Spec: v1.ServiceMonitorSpec{
		Endpoints: []v1.Endpoint{{
			Path: "/metrics",
			Port: "http-web",
		}},
		NamespaceSelector: v1.NamespaceSelector{MatchNames: []string{"monitoring"}},
		Selector: metav1.LabelSelector{MatchLabels: map[string]string{
			"app":          "kube-prometheus-stack-prometheus",
			"release":      "kube-promtheus-stack",
			"self-monitor": "true",
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "monitoring.coreos.com/v1",
		Kind:       "ServiceMonitor",
	},
}

var KubePromtheusStackKubeStateMetricsServiceMonitor = &v1.ServiceMonitor{
	ObjectMeta: metav1.ObjectMeta{
		Labels: map[string]string{
			"app.kubernetes.io/component":  "metrics",
			"app.kubernetes.io/instance":   "kube-promtheus-stack",
			"app.kubernetes.io/managed-by": "Helm",
			"app.kubernetes.io/name":       "kube-state-metrics",
			"app.kubernetes.io/part-of":    "kube-state-metrics",
			"app.kubernetes.io/version":    "2.9.2",
			"helm.sh/chart":                "kube-state-metrics-5.7.0",
			"release":                      "kube-promtheus-stack",
		},
		Name:      "kube-promtheus-stack-kube-state-metrics",
		Namespace: "monitoring",
	},
	Spec: v1.ServiceMonitorSpec{
		Endpoints: []v1.Endpoint{{
			HonorLabels: true,
			Port:        "http",
		}},
		JobLabel: "app.kubernetes.io/name",
		Selector: metav1.LabelSelector{MatchLabels: map[string]string{
			"app.kubernetes.io/instance": "kube-promtheus-stack",
			"app.kubernetes.io/name":     "kube-state-metrics",
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "monitoring.coreos.com/v1",
		Kind:       "ServiceMonitor",
	},
}

var KubePromtheusStackPrometheusNodeExporterServiceMonitor = &v1.ServiceMonitor{
	ObjectMeta: metav1.ObjectMeta{
		Labels: map[string]string{
			"app.kubernetes.io/component":  "metrics",
			"app.kubernetes.io/instance":   "kube-promtheus-stack",
			"app.kubernetes.io/managed-by": "Helm",
			"app.kubernetes.io/name":       "prometheus-node-exporter",
			"app.kubernetes.io/part-of":    "prometheus-node-exporter",
			"app.kubernetes.io/version":    "1.5.0",
			"helm.sh/chart":                "prometheus-node-exporter-4.17.5",
			"jobLabel":                     "node-exporter",
			"release":                      "kube-promtheus-stack",
		},
		Name:      "kube-promtheus-stack-prometheus-node-exporter",
		Namespace: "monitoring",
	},
	Spec: v1.ServiceMonitorSpec{
		Endpoints: []v1.Endpoint{{
			Port:   "http-metrics",
			Scheme: "http",
		}},
		JobLabel: "jobLabel",
		Selector: metav1.LabelSelector{MatchLabels: map[string]string{
			"app.kubernetes.io/instance": "kube-promtheus-stack",
			"app.kubernetes.io/name":     "prometheus-node-exporter",
		}},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "monitoring.coreos.com/v1",
		Kind:       "ServiceMonitor",
	},
}
