-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cnpg-monitoring): added cnpg-monitoring helm chart
- Loading branch information
Showing
4 changed files
with
139 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dependencies: | ||
- name: kube-state-metrics | ||
repository: https://prometheus-community.github.io/helm-charts | ||
version: 5.25.1 | ||
digest: sha256:44ef0e594a43e89ac37d87b317983705a7318e177bc1c97ce11e8bfcb9322e54 | ||
generated: "2024-08-01T10:01:05.918725051+02:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: v2 | ||
name: cnpg-monitoring | ||
description: A kube-state-metrics to generate and expose CNPG resources metrics | ||
type: application | ||
version: 0.1.0 | ||
dependencies: | ||
- name: kube-state-metrics | ||
version: "5.25.*" | ||
repository: https://prometheus-community.github.io/helm-charts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
kube-state-metrics: | ||
prometheus: | ||
monitor: | ||
enabled: true | ||
jobLabel: "app.kubernetes.io/instance" | ||
collectors: [ ] | ||
extraArgs: | ||
- --custom-resource-state-only=true | ||
rbac: | ||
extraRules: | ||
- apiGroups: | ||
- postgresql.cnpg.io | ||
resources: | ||
- clusters | ||
- poolers | ||
- scheduledbackups | ||
verbs: [ "list", "watch" ] | ||
|
||
customResourceState: | ||
enabled: true | ||
config: | ||
spec: | ||
resources: | ||
- groupVersionKind: | ||
group: postgresql.cnpg.io | ||
version: v1 | ||
kind: Cluster | ||
metricNamePrefix: cnpg_resource_cluster | ||
metrics: | ||
- name: info | ||
help: Information about CNPG Cluster | ||
each: | ||
type: Info | ||
info: | ||
labelsFromPath: | ||
cnpg_commit_hash: [status, cloudNativePGCommitHash] | ||
primary_update_method: [spec, primaryUpdateMethod] | ||
primary_update_strategy: [spec, primaryUpdateStrategy] | ||
- name: condition | ||
help: The condition of a CNPG Cluster | ||
each: | ||
type: Gauge | ||
gauge: | ||
path: [status, conditions] | ||
labelsFromPath: | ||
type: [type] | ||
reason: [reason] | ||
valueFrom: [status] | ||
- name: spec_instances | ||
help: Number of desired instances for a CNPG Cluster | ||
each: | ||
type: Gauge | ||
gauge: | ||
path: [spec, instances] | ||
- name: status_instances | ||
help: Number of instances per CNPG Cluster | ||
each: | ||
type: Gauge | ||
gauge: | ||
path: [status, instances] | ||
- name: status_ready_instances | ||
help: Number of ready instances per CNPG Cluster | ||
each: | ||
type: Gauge | ||
gauge: | ||
path: [status, readyInstances] | ||
labelsFromPath: | ||
name: [metadata, name] | ||
namespace: [metadata, namespace] | ||
cnpg_cluster: [metadata, name] | ||
- groupVersionKind: | ||
group: postgresql.cnpg.io | ||
version: v1 | ||
kind: Pooler | ||
metricNamePrefix: cnpg_resource_pooler | ||
metrics: | ||
- name: info | ||
help: Information about CNPG Pooler | ||
each: | ||
type: Info | ||
info: | ||
labelsFromPath: | ||
type: [spec, type] | ||
paused: [spec, pgbouncer, paused] | ||
pool_mode: [spec, pgbouncer, poolMode] | ||
- name: spec_instances | ||
help: Number of desired instances for a CNPG Pooler | ||
each: | ||
type: Gauge | ||
gauge: | ||
path: [spec, instances] | ||
- name: status_instances | ||
help: Number of instances per CNPG Pooler | ||
each: | ||
type: Gauge | ||
gauge: | ||
path: [status, instances] | ||
labelsFromPath: | ||
name: [metadata, name] | ||
namespace: [metadata, namespace] | ||
cnpg_cluster: [spec, cluster, name] |