Restart pod when connection config changed

This commit is contained in:
Tristan Cacqueray 2019-04-05 04:13:32 +00:00
parent 061c4fb008
commit 493adbe7cc
5 changed files with 22 additions and 1 deletions

View File

@ -30,6 +30,9 @@
image: "{{ zuul_image_name[deployment_name] }}"
imagePullPolicy: "{{ zuul_image_pull_policy }}"
ports: "{{ deployment_ports|default([]) }}"
env:
- name: CONFIG_CHECKSUM
value: "{{ scheduler_config.result.data | checksum }}"
volumeMounts:
- mountPath: "/etc/zuul"
name: zuul-config-volume

View File

@ -1,4 +1,10 @@
---
- name: Save queue
include_tasks: "./queue_save.yaml"
when:
- scheduler_config is changed
- zuul_scheduler_pod
- name: Scheduler Deployment
vars:
deployment_name: scheduler
@ -54,3 +60,9 @@
protocol: TCP
targetPort: 9000
include_tasks: "./create_service.yaml"
- name: Load queue
include_tasks: "./queue_load.yaml"
when:
- scheduler_config is changed
- zuul_scheduler_pod

View File

@ -0,0 +1,3 @@
---
- name: Load scheduler queue
debug: msg="TODO..."

View File

@ -0,0 +1,3 @@
---
- name: Dump scheduler queue
debug: msg="TODO..."

View File

@ -1,3 +1,3 @@
---
- name: Add scheduler pod to the inventory
command: echo TODO...
debug: msg="TODO..."