diff --git a/07_KubePrometheusStack/justfile b/07_KubePrometheusStack/justfile new file mode 100644 index 0000000..b4d8fd4 --- /dev/null +++ b/07_KubePrometheusStack/justfile @@ -0,0 +1,19 @@ +set fallback := true + +export PROMETHEUS_NAMESPACE := env("PROMETHEUS_NAMESPACE", "prometheus") + +[private] +default: + @just --list --unsorted --list-submodules + + +add-helm-repo: + @helm repo add prometheus-community https://prometheus-community.github.io/helm-charts + @helm repo update + + +install: + @just add-helm-repo + @helm upgrade --cleanup-on-fail --install kube-prometheus-stack prometheus-community/kube-prometheus-stack \ + --wait \ + -f kube-stack-config-values.yaml \ No newline at end of file diff --git a/07_KubePrometheusStack/kube-stack-config-values.yaml b/07_KubePrometheusStack/kube-stack-config-values.yaml new file mode 100644 index 0000000..af91202 --- /dev/null +++ b/07_KubePrometheusStack/kube-stack-config-values.yaml @@ -0,0 +1,78 @@ +# +# Copyright © contributors to CloudNativePG, established as +# CloudNativePG a Series of LF Projects, LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +# -- here you can pass the whole values directly to the kube-prometheus-stack chart +enabled: true +kubeControllerManager: + enabled: false +nodeExporter: + enabled: false +defaultRules: + create: true + rules: + alertmanager: false + etcd: false + configReloaders: false + general: false + k8s: true + kubeApiserver: false + kubeApiserverAvailability: false + kubeApiserverSlos: false + kubelet: true + kubeProxy: false + kubePrometheusGeneral: false + kubePrometheusNodeRecording: false + kubernetesApps: false + kubernetesResources: false + kubernetesStorage: false + kubernetesSystem: false + kubeScheduler: false + kubeStateMetrics: false + network: false + node: true + nodeExporterAlerting: false + nodeExporterRecording: true + prometheus: false + prometheusOperator: false + +#nodeSelector: + #workload: monitor +prometheus: + prometheusSpec: + podMonitorSelectorNilUsesHelmValues: false + ruleSelectorNilUsesHelmValues: false + serviceMonitorSelectorNilUsesHelmValues: false + probeSelectorNilUsesHelmValues: false + #nodeSelector: + #workload: monitor +grafana: + enabled: true + # -- the grafana admin password + adminPassword: prom-operator + defaultDashboardsEnabled: false + sidecar: + dashboards: + enabled: true + #nodeSelector: + #workload: monitor +alertmanager: + enabled: true + #alertManagerSpec: + #nodeSelector: + #workload: monitor diff --git a/justfile b/justfile index abf5221..254933e 100644 --- a/justfile +++ b/justfile @@ -13,4 +13,5 @@ mod Traefik mod Longhorn mod Vault '08_Vault' mod ExternalSecrets '09_ExternalSecrets' -mod Postgres '10_Postgres' \ No newline at end of file +mod Postgres '10_Postgres' +mod KubePrometheusStack '07_KubePrometheusStack' \ No newline at end of file