helm pull missing-container-metrics/missing-container-metrics tar xvf missing-container-metrics-0.1.1.tgz cd missing-container-metrics ls Chart.yaml README.md templates values.yaml
###添加 prometheusOperator: podMonitor: # Create a Prometheus Operator PodMonitor resource enabled: true # Namespace defaults to the Release namespace but can be overridden namespace: "" # Additional labels to add to the PodMonitor so it matches the Operator's podMonitorSelector selector: app.kubernetes.io/name: missing-container-metrics
prometheusRule: # Create a Prometheus Operator PrometheusRule resource enabled: true # Namespace defaults to the Release namespace but can be overridden namespace: "" # Additional labels to add to the PrometheusRule so it matches the Operator's ruleSelector selector: prometheus: k8s role: alert-rules # The rules can be set here. An example is defined here but can be overridden. rules: - alert: ContainerOOMObserved annotations: message: A process in this Pod has been OOMKilled due to exceeding the Kubernetes memory limit at least twice in the last 15 minutes. Look at the metrics to determine if a memory limit increase is required. expr: sum(increase(container_ooms[15m])) by (exported_namespace, exported_pod) > 2 labels: severity: warning - alert: ContainerOOMObserved annotations: message: A process in this Pod has been OOMKilled due to exceeding the Kubernetes memory limit at least ten times in the last 15 minutes. Look at the metrics to determine if a memory limit increase is required. expr: sum(increase(container_ooms[15m])) by (exported_namespace, exported_pod) > 10 labels: severity: critical