diff --git a/roles/kubernetes-apps/ansible/defaults/main.yml b/roles/kubernetes-apps/ansible/defaults/main.yml index 726e7fc21bf6f9c3f51510f7569c24ea6f52cb03..daebd07f6bb9ac61d615c0acbe00c6f1505bee6c 100644 --- a/roles/kubernetes-apps/ansible/defaults/main.yml +++ b/roles/kubernetes-apps/ansible/defaults/main.yml @@ -94,6 +94,11 @@ netchecker_server_user: 1000 netchecker_agent_group: 1000 netchecker_server_group: 1000 +# Log levels +netchecker_agent_log_level: 5 +netchecker_server_log_level: 5 +netchecker_etcd_log_level: info + # Dashboard dashboard_replicas: 1 diff --git a/roles/kubernetes-apps/ansible/templates/netchecker-agent-ds.yml.j2 b/roles/kubernetes-apps/ansible/templates/netchecker-agent-ds.yml.j2 index 40dd199e006ee07c70bd3bfcfe9751e34364413a..b1461b61f30e11f57ceb7845e8311b3c86db3523 100644 --- a/roles/kubernetes-apps/ansible/templates/netchecker-agent-ds.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/netchecker-agent-ds.yml.j2 @@ -35,7 +35,7 @@ spec: fieldRef: fieldPath: spec.nodeName args: - - "-v=5" + - "-v={{ netchecker_agent_log_level }}" - "-alsologtostderr=true" - "-serverendpoint=netchecker-service:8081" - "-reportinterval={{ agent_report_interval }}" diff --git a/roles/kubernetes-apps/ansible/templates/netchecker-agent-hostnet-ds.yml.j2 b/roles/kubernetes-apps/ansible/templates/netchecker-agent-hostnet-ds.yml.j2 index 50e2793353ad4aaa0c14c085b11ded08db729243..2dd113cc694716e0edcef633c8e4a804c9d30aac 100644 --- a/roles/kubernetes-apps/ansible/templates/netchecker-agent-hostnet-ds.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/netchecker-agent-hostnet-ds.yml.j2 @@ -37,7 +37,7 @@ spec: fieldRef: fieldPath: spec.nodeName args: - - "-v=5" + - "-v={{ netchecker_agent_log_level }}" - "-alsologtostderr=true" - "-serverendpoint=netchecker-service:8081" - "-reportinterval={{ agent_report_interval }}" diff --git a/roles/kubernetes-apps/ansible/templates/netchecker-server-deployment.yml.j2 b/roles/kubernetes-apps/ansible/templates/netchecker-server-deployment.yml.j2 index 02fd6b6809e54da58fb2806dc9756766476c82ea..2f5c003f19d8e52b15703b728c05e95bef55e62b 100644 --- a/roles/kubernetes-apps/ansible/templates/netchecker-server-deployment.yml.j2 +++ b/roles/kubernetes-apps/ansible/templates/netchecker-server-deployment.yml.j2 @@ -43,7 +43,7 @@ spec: ports: - containerPort: 8081 args: - - -v=5 + - -v={{ netchecker_server_log_level }} - -logtostderr - -kubeproxyinit=false - -endpoint=0.0.0.0:8081 @@ -51,6 +51,9 @@ spec: - name: etcd image: "{{ etcd_image_repo }}:{{ netcheck_etcd_image_tag }}" imagePullPolicy: {{ k8s_image_pull_policy }} + env: + - name: ETCD_LOG_LEVEL + value: "{{ netchecker_etcd_log_level }}" command: - etcd - --listen-client-urls=http://127.0.0.1:2379