diff options
author | Wander Boessenkool <wander.boessenkool@hcs-company.com> | 2019-10-14 14:53:53 +0200 |
---|---|---|
committer | Wander Boessenkool <wander.boessenkool@hcs-company.com> | 2019-10-14 14:53:53 +0200 |
commit | e87055095c7cfefedfb593309c8576407ef72ffb (patch) | |
tree | 461348b97ab68ac4592b7fe776319636849c5e21 /installer/roles | |
parent | Merge pull request #4974 from jakemcdermott/switch-default-job-panel (diff) | |
download | awx-e87055095c7cfefedfb593309c8576407ef72ffb.tar.xz awx-e87055095c7cfefedfb593309c8576407ef72ffb.zip |
Change 'rabbitmqctl status' to a wget | grep
- This reduces CPU usage from 250 millis on idle to 25 millis on idle
- Default rabbitmq user needs administrator privileges
Diffstat (limited to 'installer/roles')
-rw-r--r-- | installer/roles/kubernetes/templates/deployment.yml.j2 | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/installer/roles/kubernetes/templates/deployment.yml.j2 b/installer/roles/kubernetes/templates/deployment.yml.j2 index 8e9f234c20..59b4015a7d 100644 --- a/installer/roles/kubernetes/templates/deployment.yml.j2 +++ b/installer/roles/kubernetes/templates/deployment.yml.j2 @@ -39,7 +39,7 @@ data: [rabbitmq_management,rabbitmq_peer_discovery_k8s]. rabbitmq_definitions.json: | { - "users":[{"name": "{{ rabbitmq_user }}", "password": "{{ rabbitmq_password }}", "tags": ""}], + "users":[{"name": "{{ rabbitmq_user }}", "password": "{{ rabbitmq_password }}", "tags": "administrator"}], "permissions":[ {"user":"{{ rabbitmq_user }}","vhost":"awx","configure":".*","write":".*","read":".*"} ], @@ -269,12 +269,18 @@ spec: containerPort: 5672 livenessProbe: exec: - command: ["rabbitmqctl", "status"] + command: + - /bin/ash + - -c + - "wget -O - --header \"Authorization: Basic {{ ( rabbitmq_user + ':' + rabbitmq_password ) | b64encode }}\" http://localhost:15672/api/healthchecks/node | grep -qF \"{\"status\":\"ok\"}\"" initialDelaySeconds: 30 timeoutSeconds: 10 readinessProbe: exec: - command: ["rabbitmqctl", "status"] + command: + - /bin/ash + - -c + - "wget -O - --header \"Authorization: Basic {{ ( rabbitmq_user + ':' + rabbitmq_password ) | b64encode }}\" http://localhost:15672/api/healthchecks/node | grep -qF \"{\"status\":\"ok\"}\"" initialDelaySeconds: 10 timeoutSeconds: 10 env: |