Skip to content

Commit

Permalink
restart kubevip if required
Browse files Browse the repository at this point in the history
  • Loading branch information
simonccc committed Aug 24, 2024
1 parent 110fd37 commit 7961543
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/GETSTARTED.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ☣️ get started
# :burger: get started

## 🇧🇸 setup kopsrox.ini

Expand Down
4 changes: 2 additions & 2 deletions docs/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ documentation is a WIP :construction:
- an alias for create

### :warning: destroy
- deletes the existing image template
- this is not really required as create deletes any existing image
- deletes any existing image template

### info
- prints info about image/template vm eg storage, id, creation time and source cloud image file
- size
- creation time
- is it stored on shared storage

## :cyclone: cluster <a name=cluster>
### :white_check_mark: create
Expand Down
8 changes: 7 additions & 1 deletion lib/kopsrox_k3s.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,14 @@ def get_kube_vip_master():
try:
kubevip_m = kubevip_o.split()[5]
except:
kmsg('kubevip_check', 'no kubevip label found - reloading kubevip', 'err')
kubevip_r = kubectl('rollout restart daemonset kube-vip-ds -n kube-system')
time.sleep(1)
kubevip_q = f'get nodes --selector kube-vip.io/has-ip={network_ip} 2>&1'
kubevip_o = kubectl(kubevip_q)
#print(kubevip_o.split())
kubevip_m = ''
kubevip_m = kubevip_o.split()[5]
# kubevip_m = ''
return(kubevip_m)

# check kube vip is ok by checking for label
Expand Down

0 comments on commit 7961543

Please sign in to comment.