Skip to content

Commit

Permalink
Enable Google Cloud Monitoring and Google Cloud Logging instead of
Browse files Browse the repository at this point in the history
Influxdb for Google Compute Engine deployments.
  • Loading branch information
saad-ali committed May 5, 2015
1 parent fe7cb95 commit 6811387
Show file tree
Hide file tree
Showing 24 changed files with 253 additions and 247 deletions.
4 changes: 2 additions & 2 deletions build/common.sh
Expand Up @@ -651,11 +651,11 @@ function kube::release::package_salt_tarball() {
cp -R "${KUBE_ROOT}/cluster/saltbase" "${release_stage}/"

# TODO(#3579): This is a temporary hack. It gathers up the yaml,
# yaml.in files in cluster/addons (minus any demos) and overlays
# yaml.in, json files in cluster/addons (minus any demos) and overlays
# them into kube-addons, where we expect them. (This pipeline is a
# fancy copy, stripping anything but the files we don't want.)
local objects
objects=$(cd "${KUBE_ROOT}/cluster/addons" && find . -name \*.yaml -or -name \*.yaml.in | grep -v demo)
objects=$(cd "${KUBE_ROOT}/cluster/addons" && find . \( -name \*.yaml -or -name \*.yaml.in -or -name \*.json \) | grep -v demo)
tar c -C "${KUBE_ROOT}/cluster/addons" ${objects} | tar x -C "${release_stage}/saltbase/salt/kube-addons"

kube::release::clean_cruft
Expand Down
54 changes: 54 additions & 0 deletions cluster/addons/cluster-monitoring/google/heapster-controller.json
@@ -0,0 +1,54 @@
{
"apiVersion": "v1beta3",
"kind": "ReplicationController",
"metadata": {
"labels": {
"name": "heapster",
"kubernetes.io/cluster-service": "true"
},
"name": "monitoring-heapster-controller"
},
"spec": {
"replicas": 1,
"selector": {
"name": "heapster"
},
"template": {
"metadata": {
"labels": {
"name": "heapster",
"kubernetes.io/cluster-service": "true"
}
},
"spec": {
"containers": [
{
"image": "gcr.io/google_containers/heapster:v0.11.0",
"name": "heapster",
"env": [
{
"name": "FLAGS",
"value": "--poll_duration=2m --stats_resolution=1m --sink=gcm --sink=gcl"
}
],
"volumeMounts": [
{
"name": "ssl-certs",
"mountPath": "/etc/ssl/certs",
"readOnly": true
}
]
}
],
"volumes": [
{
"name": "ssl-certs",
"hostPath": {
"path": "/etc/ssl/certs"
}
}
]
}
}
}
}
10 changes: 0 additions & 10 deletions cluster/addons/cluster-monitoring/grafana-service.yaml

This file was deleted.

36 changes: 0 additions & 36 deletions cluster/addons/cluster-monitoring/heapster-controller.yaml

This file was deleted.

10 changes: 0 additions & 10 deletions cluster/addons/cluster-monitoring/heapster-service.yaml

This file was deleted.

35 changes: 0 additions & 35 deletions cluster/addons/cluster-monitoring/influxdb-grafana-controller.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions cluster/addons/cluster-monitoring/influxdb-service.yaml

This file was deleted.

22 changes: 22 additions & 0 deletions cluster/addons/cluster-monitoring/influxdb/grafana-service.json
@@ -0,0 +1,22 @@
{
"apiVersion": "v1beta3",
"kind": "Service",
"metadata": {
"labels": {
"name": "influxGrafana",
"kubernetes.io/cluster-service": "true"
},
"name": "monitoring-grafana"
},
"spec": {
"ports": [
{
"port": 80,
"targetPort": 8080
}
],
"selector": {
"name": "influxGrafana"
}
}
}
@@ -0,0 +1,54 @@
{
"apiVersion": "v1beta3",
"kind": "ReplicationController",
"metadata": {
"labels": {
"name": "heapster",
"kubernetes.io/cluster-service": "true"
},
"name": "monitoring-heapster-controller"
},
"spec": {
"replicas": 1,
"selector": {
"name": "heapster"
},
"template": {
"metadata": {
"labels": {
"name": "heapster",
"kubernetes.io/cluster-service": "true"
}
},
"spec": {
"containers": [
{
"image": "gcr.io/google_containers/heapster:v0.11.0",
"name": "heapster",
"env": [
{
"name": "FLAGS",
"value": "--poll_duration=2m --stats_resolution=1m --sink influxdb:http://monitoring-influxdb.default.kubernetes.local:8086"
}
],
"volumeMounts": [
{
"name": "ssl-certs",
"mountPath": "/etc/ssl/certs",
"readOnly": true
}
]
}
],
"volumes": [
{
"name": "ssl-certs",
"hostPath": {
"path": "/etc/ssl/certs"
}
}
]
}
}
}
}
@@ -0,0 +1,61 @@
{
"apiVersion": "v1beta3",
"kind": "ReplicationController",
"metadata": {
"labels": {
"name": "influxGrafana",
"kubernetes.io/cluster-service": "true"
},
"name": "monitoring-influx-grafana-controller"
},
"spec": {
"replicas": 1,
"selector": {
"name": "influxGrafana"
},
"template": {
"metadata": {
"labels": {
"name": "influxGrafana",
"kubernetes.io/cluster-service": "true"
}
},
"spec": {
"containers": [
{
"image": "gcr.io/google_containers/heapster_influxdb:v0.3",
"name": "influxdb",
"ports": [
{
"containerPort": 8083,
"hostPort": 8083
},
{
"containerPort": 8086,
"hostPort": 8086
}
]
},
{
"image": "gcr.io/google_containers/heapster_grafana:v0.7",
"name": "grafana",
"env": [
{
"name": "INFLUXDB_EXTERNAL_URL",
"value": "/api/v1beta1/proxy/services/monitoring-grafana/db/"
},
{
"name": "INFLUXDB_HOST",
"value": "monitoring-influxdb"
},
{
"name": "INFLUXDB_PORT",
"value": "80"
}
]
}
]
}
}
}
}
28 changes: 28 additions & 0 deletions cluster/addons/cluster-monitoring/influxdb/influxdb-service.json
@@ -0,0 +1,28 @@
{
"apiVersion": "v1beta3",
"kind": "Service",
"metadata": {
"labels": {
"name": "influxGrafana",
"kubernetes.io/cluster-service": "true"
},
"name": "monitoring-influxdb"
},
"spec": {
"ports": [
{
"name": "http",
"port": 8083,
"targetPort": 8083
},
{
"name": "api",
"port": 8086,
"targetPort": 8086
}
],
"selector": {
"name": "influxGrafana"
}
}
}
16 changes: 0 additions & 16 deletions cluster/addons/cluster-monitoring/v1beta3/grafana-service.yaml

This file was deleted.

35 changes: 0 additions & 35 deletions cluster/addons/cluster-monitoring/v1beta3/heapster-controller.yaml

This file was deleted.

0 comments on commit 6811387

Please sign in to comment.