use serde::Serialize;

use crate::modules::monitoring::{
    alert_rule::prometheus_alert_rule::AlertManagerRuleGroup,
    kube_prometheus::types::{AlertManagerAdditionalPromRules, AlertManagerChannelConfig},
};

#[derive(Debug, Clone, Serialize)]
pub struct KubePrometheusConfig {
    pub namespace: String,
    pub default_rules: bool,
    pub windows_monitoring: bool,
    pub alert_manager: bool,
    pub node_exporter: bool,
    pub prometheus: bool,
    pub grafana: bool,
    pub kubernetes_service_monitors: bool,
    pub kubernetes_api_server: bool,
    pub kubelet: bool,
    pub kube_controller_manager: bool,
    pub core_dns: bool,
    pub kube_etcd: bool,
    pub kube_scheduler: bool,
    pub kube_proxy: bool,
    pub kube_state_metrics: bool,
    pub prometheus_operator: bool,
    pub alert_receiver_configs: Vec<AlertManagerChannelConfig>,
    pub alert_rules: Vec<AlertManagerAdditionalPromRules>,
}
impl KubePrometheusConfig {
    pub fn new() -> Self {
        Self {
            namespace: "monitoring".into(),
            default_rules: true,
            windows_monitoring: false,
            alert_manager: true,
            grafana: true,
            node_exporter: false,
            prometheus: true,
            kubernetes_service_monitors: true,
            kubernetes_api_server: false,
            kubelet: false,
            kube_controller_manager: false,
            kube_etcd: false,
            kube_proxy: false,
            kube_state_metrics: true,
            prometheus_operator: true,
            core_dns: false,
            kube_scheduler: false,
            alert_receiver_configs: vec![],
            alert_rules: vec![],
        }
    }
}
