Skip to content

Commit d561b73

Browse files
author
Jody McIntyre
committed
Add playbook to update plotly.js
1 parent 4a7e4bf commit d561b73

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
- hosts: localhost
2+
gather_facts: False
3+
vars:
4+
cluster: imageserver-stage
5+
zone: us-central1-a
6+
roles:
7+
- common
8+
- update_plotlyjs
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# From https://github.com/kubernetes/kubernetes/issues/27081#issuecomment-238078103
2+
# Change an unused variable in the deployment config, which will cause a
3+
# rolling update that creates new pods. (New pods will automatically run the
4+
# latest plotly.js since that's loaded on boot.)
5+
6+
- name: Show timestamp
7+
local_action: command date +%s
8+
register: date
9+
10+
- name: Update plotly.js by patching the deployment
11+
local_action: command kubectl patch deployment imageserver --patch "{\"spec\":{\"template\":{\"metadata\":{\"labels\":{\"RESTART_DATE\":\"{{ date.stdout }}\"}}}}}"

0 commit comments

Comments
 (0)