mirror of
https://github.com/lucky-sideburn/kubeinvaders.git
synced 2026-02-14 17:50:00 +00:00
fix clusterrole
This commit is contained in:
24
README.md
24
README.md
@@ -105,6 +105,30 @@ metadata:
|
||||
namespace: kubeinvaders
|
||||
annotations:
|
||||
kubernetes.io/service-account.name: kinv-sa
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
namespace: default
|
||||
name: kubevirt-vm-restart-role
|
||||
rules:
|
||||
- apiGroups: ["subresources.kubevirt.io"]
|
||||
resources: ["virtualmachines/restart"]
|
||||
verbs: ["update"]
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: kubevirt-vm-restart-binding
|
||||
namespace: default
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: kubeinvaders
|
||||
namespace: kubeinvaders
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: kubevirt-vm-restart-role
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
EOF
|
||||
```
|
||||
|
||||
|
||||
@@ -43,4 +43,25 @@ roleRef:
|
||||
kind: ClusterRole
|
||||
name: {{ template "kubeinvaders.clusterRoleName" . }}
|
||||
{{- end -}}
|
||||
kind: Role
|
||||
metadata:
|
||||
namespace: {{ .Release.Namespace }}
|
||||
name: kubevirt-vm-restart-role
|
||||
rules:
|
||||
- apiGroups: ["subresources.kubevirt.io"]
|
||||
resources: ["virtualmachines/restart"]
|
||||
verbs: ["update"]
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: kubevirt-vm-restart-binding
|
||||
namespace: {{ .Release.Namespace }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ template "kubeinvaders.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: kubevirt-vm-restart-role
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
{{- end -}}
|
||||
|
||||
BIN
html/images/sprite_invader_vm_stopping.png
Normal file
BIN
html/images/sprite_invader_vm_stopping.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
@@ -682,6 +682,10 @@ k8s_jobs:
|
||||
<img src="./images/sprite_invader_vm_starting.png" alt="VM Starting" class="me-3" style="width: 20px; height: 20px;">
|
||||
restarting
|
||||
</li>
|
||||
<li class="list-group-item d-flex align-items-center">
|
||||
<img src="./images/sprite_invader_vm_stopping.png" alt="VM Starting" class="me-3" style="width: 20px; height: 20px;">
|
||||
stopping
|
||||
</li>
|
||||
<li class="list-group-item d-flex align-items-center">
|
||||
<img src="./images/sprite_invader_vm_stopped.png" alt="VM Stopped" class="me-3" style="width: 20px; height: 20px;">
|
||||
stopped
|
||||
@@ -741,7 +745,7 @@ k8s_jobs:
|
||||
<div class="container text-center" style="margin-top: 20%;">
|
||||
<div>
|
||||
<img style="scale: 60%" src="images/kubeinvaders_spaceship2.png" id="spaceShip">
|
||||
<p class="text-muted credit" style="color:#fff;">version: 2024-12-30 08:58:24</p>
|
||||
<p class="text-muted credit" style="color:#fff;">version: 2024-12-30 09:11:59</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -339,9 +339,9 @@ function startChaosNode(node_name) {
|
||||
function rebootVirtualMachine(vm_name) {
|
||||
var oReq = new XMLHttpRequest();
|
||||
oReq.onload = function () {
|
||||
$('#alert_placeholder').replaceWith(alert_div + 'Latest action: Prepareing reboot virtual machine ' + vm_name + '</div>');
|
||||
$('#alert_placeholder').replaceWith(alert_div + 'Latest action: Reboot virtual machine ' + vm_name + '</div>');
|
||||
};;
|
||||
$('#alert_placeholder').replaceWith(alert_div + 'Latest action: Reboot virtual machine ' + vm_name + '</div>');
|
||||
$('#alert_placeholder').replaceWith(alert_div + 'Latest action: Preparing virtual machine ' + vm_name + '</div>');
|
||||
oReq.open("GET", k8s_url + "/kube/vm_reboot?vm_name=" + vm_name + "&namespace=" + namespace);
|
||||
oReq.send();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user