// 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"
	"k8s.io/apimachinery/pkg/util/intstr"
)

var KubePromtheusStackKubePrometheusPrometheus = &v1.Prometheus{
	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.PrometheusSpec{
		Alerting: &v1.AlertingSpec{
			Alertmanagers: []v1.AlertmanagerEndpoints{
				{
					APIVersion: "v2",
					Name:       "kube-promtheus-stack-kube-alertmanager",
					Namespace:  P("monitoring"),
					PathPrefix: "/",
					Port: intstr.IntOrString{
						StrVal: "http-web",
						Type:   intstr.Type(int64(1)),
					},
				},
			},
		},
		CommonPrometheusFields: v1.CommonPrometheusFields{
			ExternalURL:          "http://kube-promtheus-stack-kube-prometheus.monitoring:9090",
			Image:                P("quay.io/prometheus/prometheus:v2.44.0"),
			LogFormat:            "logfmt",
			LogLevel:             "info",
			PodMonitorSelector:   &metav1.LabelSelector{MatchLabels: map[string]string{"release": "kube-promtheus-stack"}},
			PortName:             "http-web",
			ProbeSelector:        &metav1.LabelSelector{MatchLabels: map[string]string{"release": "kube-promtheus-stack"}},
			Replicas:             P(int32(1)),
			RoutePrefix:          "/",
			ScrapeConfigSelector: &metav1.LabelSelector{MatchLabels: map[string]string{"release": "kube-promtheus-stack"}},
			SecurityContext: &corev1.PodSecurityContext{
				FSGroup:        P(int64(2000)),
				RunAsGroup:     P(int64(2000)),
				RunAsNonRoot:   P(true),
				RunAsUser:      P(int64(1000)),
				SeccompProfile: &corev1.SeccompProfile{Type: corev1.SeccompProfileType("RuntimeDefault")},
			},
			ServiceAccountName:     "kube-promtheus-stack-kube-prometheus",
			ServiceMonitorSelector: &metav1.LabelSelector{MatchLabels: map[string]string{"release": "kube-promtheus-stack"}},
			Shards:                 P(int32(1)),
			Version:                "v2.44.0",
			WALCompression:         P(true),
		},
		Retention:    v1.Duration("10d"),
		RuleSelector: &metav1.LabelSelector{MatchLabels: map[string]string{"release": "kube-promtheus-stack"}},
		TSDB:         v1.TSDBSpec{OutOfOrderTimeWindow: v1.Duration("0s")},
	},
	TypeMeta: metav1.TypeMeta{
		APIVersion: "monitoring.coreos.com/v1",
		Kind:       "Prometheus",
	},
}
