make configurable the kubeburner indexing period
Change-Id: I56aaf32fecb11ae260a89817fc7e77bf69b7991d
This commit is contained in:
parent
e4b3d6d619
commit
77c5a5ed92
@ -17,6 +17,7 @@ python_interpreter: /usr/bin/python3.6
|
||||
kubeconfig_path: /home/kni/clusterconfigs/auth/kubeconfig
|
||||
kube_burner_path: https://github.com/cloud-bulldozer/kube-burner/releases/download/v1.7.12/kube-burner-V1.7.12-linux-x86_64.tar.gz
|
||||
ocp_metrics_query: roles/index-ocp-data/templates/metrics.yaml
|
||||
kubeburner_index_interval: 10 #in minutes
|
||||
|
||||
# OpenStack Installer
|
||||
# Tripleo is the only installer supported currently
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
- name: calculate start time from end time
|
||||
set_fact:
|
||||
start_time: "{{ end_time | int - 1800 }}"
|
||||
start_time: "{{ end_time | int - (kubeburner_index_interval | int * 60) }}"
|
||||
when: start_time is undefined
|
||||
|
||||
- name: Check if all variables are defined
|
||||
|
@ -19,17 +19,17 @@
|
||||
name: index-ocp-data
|
||||
vars:
|
||||
start_time: "{{ log_file.stat.mtime | int }}"
|
||||
when: log_file.stat.exists and (file_age | int < 30)
|
||||
when: log_file.stat.exists and (file_age | int < kubeburner_index_interval | int)
|
||||
|
||||
- name: run the ansible task without start time
|
||||
include_role:
|
||||
name: index-ocp-data
|
||||
when: not log_file.stat.exists or (file_age | int >= 30)
|
||||
when: not log_file.stat.exists or (file_age | int >= kubeburner_index_interval | int)
|
||||
when: cron_state == "absent"
|
||||
|
||||
- name: toggle the indexing OCP data cron job
|
||||
cron:
|
||||
name: "Index ocp data every 30 mins"
|
||||
minute: "*/30"
|
||||
name: "Index ocp data for the given time"
|
||||
minute: "*/{{ kubeburner_index_interval | int }}"
|
||||
job: "PATH=/usr/local/bin:/usr/bin:/bin && /usr/bin/ansible-playbook {{ browbeat_path }}/ansible/install/index-ocp-data.yml > /tmp/ocp_index_cron.log 2>&1"
|
||||
state: "{{ cron_state }}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user