mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Add automatic prometheus monitoring to the cockroachdb example
This commit is contained in:
		@@ -2,7 +2,12 @@ apiVersion: v1
 | 
				
			|||||||
kind: Service
 | 
					kind: Service
 | 
				
			||||||
metadata:
 | 
					metadata:
 | 
				
			||||||
  annotations:
 | 
					  annotations:
 | 
				
			||||||
 | 
					    # Make sure DNS is resolvable during initialization.
 | 
				
			||||||
    service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
 | 
					    service.alpha.kubernetes.io/tolerate-unready-endpoints: "true"
 | 
				
			||||||
 | 
					    # Enable automatic monitoring of all instances when Prometheus is running in the cluster.
 | 
				
			||||||
 | 
					    prometheus.io/scrape: "true"
 | 
				
			||||||
 | 
					    prometheus.io/path: "_status/vars"
 | 
				
			||||||
 | 
					    prometheus.io/port: "8080"
 | 
				
			||||||
  name: cockroachdb
 | 
					  name: cockroachdb
 | 
				
			||||||
  labels:
 | 
					  labels:
 | 
				
			||||||
    app: cockroachdb
 | 
					    app: cockroachdb
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -54,6 +54,8 @@ kind: PersistentVolumeClaim
 | 
				
			|||||||
apiVersion: v1
 | 
					apiVersion: v1
 | 
				
			||||||
metadata:
 | 
					metadata:
 | 
				
			||||||
  name: datadir-cockroachdb-${i}
 | 
					  name: datadir-cockroachdb-${i}
 | 
				
			||||||
 | 
					  labels:
 | 
				
			||||||
 | 
					    app: cockroachdb
 | 
				
			||||||
spec:
 | 
					spec:
 | 
				
			||||||
  accessModes:
 | 
					  accessModes:
 | 
				
			||||||
    - ReadWriteOnce
 | 
					    - ReadWriteOnce
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user