enix / x509-certificate-exporter

A Prometheus exporter to monitor x509 certificates expiration in Kubernetes clusters or standalone
MIT License
658 stars 68 forks source link

Feature request - give sane defaults for k3s distribution #343

Open gecube opened 1 month ago

gecube commented 1 month ago

Good day!

Right now the installation of this nice exporter on k3s fails, because of completely different layout of paths. It would be nice to provide a solid example of config to cover k3s/rke distributions, as they are relatively very popular

gecube commented 1 month ago

I believe the list should be like:

    grafana:
      createDashboard: true
    hostPathsExporter:
      daemonSets:
        nodes:
          watchFiles:
            - /var/lib/rancher/k3s/server/tls/client-admin.crt
            - /var/lib/rancher/k3s/server/tls/client-auth-proxy.crt
            - /var/lib/rancher/k3s/server/tls/client-ca.crt
            - /var/lib/rancher/k3s/server/tls/client-controller.crt
            - /var/lib/rancher/k3s/server/tls/client-k3s-cloud-controller.crt
            - /var/lib/rancher/k3s/server/tls/client-k3s-controller.crt
            - /var/lib/rancher/k3s/server/tls/client-kube-apiserver.crt
            - /var/lib/rancher/k3s/server/tls/client-kube-proxy.crt
            - /var/lib/rancher/k3s/server/tls/client-scheduler.crt
            - /var/lib/rancher/k3s/server/tls/client-supervisor.crt
            - /var/lib/rancher/k3s/server/tls/request-header-ca.crt
            - /var/lib/rancher/k3s/server/tls/server-ca.crt
            - /var/lib/rancher/k3s/server/tls/serving-kube-apiserver.crt
            - /var/lib/rancher/k3s/agent/client-ca.crt
            - /var/lib/rancher/k3s/agent/client-k3s-controller.crt
            - /var/lib/rancher/k3s/agent/client-kube-proxy.crt
            - /var/lib/rancher/k3s/agent/client-kubelet.crt
            - /var/lib/rancher/k3s/agent/server-ca.crt
            - /var/lib/rancher/k3s/agent/serving-kubelet.crt
          watchKubeconfFiles:
            - /var/lib/rancher/k3s/server/cred/admin.kubeconfig
            - /var/lib/rancher/k3s/server/cred/api-server.kubeconfig
            - /var/lib/rancher/k3s/server/cred/cloud-controller.kubeconfig
            - /var/lib/rancher/k3s/server/cred/controller.kubeconfig
            - /var/lib/rancher/k3s/server/cred/scheduler.kubeconfig
            - /var/lib/rancher/k3s/server/cred/supervisor.kubeconfig
            - /var/lib/rancher/k3s/agent/k3scontroller.kubeconfig
            - /var/lib/rancher/k3s/agent/kubelet.kubeconfig
            - /var/lib/rancher/k3s/agent/kubeproxy.kubeconfig