Added logging to file for cluster autoscaler

This commit is contained in:
Piotr Szczesniak
2016-06-02 13:51:40 +02:00
parent 3b908a538d
commit 66fce8fe44
5 changed files with 34 additions and 12 deletions

View File

@@ -27,12 +27,9 @@
"name": "cluster-autoscaler",
"image": "gcr.io/google_containers/cluster-autoscaler:v0.1.1",
"command": [
"./cluster-autoscaler",
"--kubernetes=http://127.0.0.1:8080?inClusterConfig=f",
{% for param in params.split(" ") %}
"{{param}}",
{% endfor %}
"-v=4"
"/bin/sh",
"-c",
"./cluster-autoscaler --kubernetes=http://127.0.0.1:8080?inClusterConfig=f -v=4 {{params}} 1>>/var/log/cluster-autoscaler.log 2>&1"
],
"resources": {
"limits": {
@@ -50,6 +47,11 @@
"name": "ssl-certs",
"readOnly": true,
"mountPath": "/etc/ssl/certs"
},
{
"name": "logfile",
"mountPath": "/var/log/cluster-autoscaler.log",
"readOnly": false
}
],
"terminationMessagePath": "/dev/termination-log",
@@ -63,6 +65,12 @@
"hostPath": {
"path": "/etc/ssl/certs"
}
},
{
"name": "logfile",
"hostPath": {
"path": "/var/log/cluster-autoscaler.log"
}
}
],
"restartPolicy": "Always"

View File

@@ -17,3 +17,9 @@
- require:
- service: docker
- service: kubelet
/var/log/cluster-autoscaler.log:
file.managed:
- user: root
- group: root
- mode: 644