Add metric collection to charms for autoscalling

pull/6/head
Marco Ceppi 2017-02-23 15:30:07 -05:00 committed by George Kraft
parent a435456993
commit d3428ef3a4
7 changed files with 45 additions and 2 deletions

2
cluster/juju/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
builds
deps

View File

@ -1,5 +1,6 @@
repo: https://github.com/kubernetes/kubernetes.git
includes:
- 'layer:metrics'
- 'layer:nagios'
- 'layer:nginx'
- 'layer:tls-client'

View File

@ -0,0 +1,2 @@
metrics:
juju-units: {}

View File

@ -1,10 +1,11 @@
repo: https://github.com/kubernetes/kubernetes.git
includes:
- 'layer:basic'
- 'layer:tls-client'
- 'layer:leadership'
- 'layer:debug'
- 'layer:leadership'
- 'layer:metrics'
- 'layer:nagios'
- 'layer:tls-client'
- 'interface:ceph-admin'
- 'interface:etcd'
- 'interface:http'

View File

@ -0,0 +1,34 @@
metrics:
juju-units: {}
pods:
type: gauge
description: number of pods
command: kubectl get po --all-namespaces | tail -n+2 | wc -l
services:
type: gauge
description: number of services
command: kubectl get svc --all-namespaces | tail -n+2 | wc -l
replicasets:
type: gauge
description: number of replicasets
command: kubectl get rs --all-namespaces | tail -n+2 | wc -l
replicationcontrollers:
type: gauge
description: number of replicationcontrollers
command: kubectl get rc --all-namespaces | tail -n+2 | wc -l
nodes:
type: gauge
description: number of kubernetes nodes
command: kubectl get nodes | tail -n+2 | wc -l
persistentvolume:
type: gauge
description: number of pv
command: kubectl get pv --all-namespaces | tail -n+2 | wc -l
persistentvolumeclaims:
type: gauge
description: number of claims
command: kubectl get pvc --all-namespaces | tail -n+2 | wc -l
serviceaccounts:
type: gauge
description: number of sa
command: kubectl get sa --all-namespaces | tail -n+2 | wc -l

View File

@ -3,6 +3,7 @@ includes:
- 'layer:basic'
- 'layer:debug'
- 'layer:docker'
- 'layer:metrics'
- 'layer:nagios'
- 'layer:tls-client'
- 'layer:nvidia-cuda'

View File

@ -0,0 +1,2 @@
metrics:
juju-units: {}