Restart pod when connection config changed
This commit is contained in:
parent
061c4fb008
commit
493adbe7cc
@ -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
|
||||
|
@ -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
|
||||
|
3
ansible/roles/deploy/tasks/queue_load.yaml
Normal file
3
ansible/roles/deploy/tasks/queue_load.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
- name: Load scheduler queue
|
||||
debug: msg="TODO..."
|
3
ansible/roles/deploy/tasks/queue_save.yaml
Normal file
3
ansible/roles/deploy/tasks/queue_save.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
- name: Dump scheduler queue
|
||||
debug: msg="TODO..."
|
@ -1,3 +1,3 @@
|
||||
---
|
||||
- name: Add scheduler pod to the inventory
|
||||
command: echo TODO...
|
||||
debug: msg="TODO..."
|
||||
|
Loading…
Reference in New Issue
Block a user