Skip to content

Instantly share code, notes, and snippets.

status:
stats:
# Нужно для отслеживания перехода из фазы в фазу
phasesTransitions:
- phase: Pending
timestamp: "2024-06-19T09:39:56Z"
- phase: Starting
timestamp: "2024-06-19T09:39:56Z"
launchTimeDuration:
# |----->
@fl64
fl64 / remove-all.sh
Last active June 20, 2024 06:11
remove dvp
#!/usr/bin/env bash
### ITS DRAFT!!!
# kubectl api-resources --api-group="kubevirt.io" -o name
# kubectl api-resources --api-group="cdi.kubevirt.io" -o name
green=$(tput setaf 2)
red=$(tput setaf 1)
yellow=$(tput setaf 3)
sizingPolicies:
- cores:
min: 1
max: 4
memory:
min: 1G
max: 4G
dedicatedCores: [false]
coreFractions: [5, 10, 20, 50, 100]
- cores:
@fl64
fl64 / ng-aio.yaml
Created June 4, 2024 09:36
virtualization AIO fix
apiVersion: deckhouse.io/v1alpha1
kind: NodeGroupConfiguration
metadata:
name: virtualization-kernel-settings.sh
spec:
bundles:
- '*'
content: |
bb-sync-file /etc/sysctl.d/99-virtualization-kernel-settings.conf - virtualization-kernel-settings-changed <<"EOF"
fs.aio-max-nr = 1048576
@fl64
fl64 / gcp.yaml
Last active May 31, 2024 16:20
gcp
apiVersion: v1
kind: Namespace
metadata:
name: vms
---
apiVersion: v1
data:
userData: |
I2Nsb3VkLWNvbmZpZwpwYWNrYWdlX3VwZGF0ZTogdHJ1ZQpwYWNrYWdlczoKICAtIHN0cm
Vzcy1uZwogIC0gdG11eAogIC0gaHRvcAogIC0gcWVtdS1ndWVzdC1hZ2VudAogIC0gaXB1
@fl64
fl64 / v12-get-vm-info.sh
Last active May 29, 2024 08:26
get all vm resources in ns
#!/usr/bin/env bash
green=$(tput setaf 2)
red=$(tput setaf 1)
yellow=$(tput setaf 3)
cyan=$(tput setaf 6)
magenta=$(tput setaf 5)
blue=$(tput setaf 4)
sgr0=$(tput sgr0)
bold=$(tput bold)
@fl64
fl64 / find-kv.sh
Last active May 28, 2024 15:09
find all kubevirt and cdi resources
#!/usr/bin/env bash
query_meta='
.items[]
| select(
(.metadata // {} | tojson | test("(kubevirt|cdi)") )
)
|
{
@fl64
fl64 / virt.xml
Created May 3, 2024 12:16
kubevirt-xml
<domstatus state='running' reason='booted' pid='93'>
<taint flag='custom-monitor'/>
<monitor path='/var/lib/libvirt/qemu/domain-1-mvp-static_static-vm/monitor.sock' type='unix'/>
<vcpus>
<vcpu id='0' pid='98'/>
<vcpu id='1' pid='99'/>
<vcpu id='2' pid='100'/>
<vcpu id='3' pid='101'/>
</vcpus>
<qemuCaps>
@fl64
fl64 / main.go
Last active February 26, 2024 16:39
validate cloud provider spec
package main
import (
"fmt"
"log"
"os"
dhctl "github.com/deckhouse/deckhouse/dhctl/pkg/config"
)
@fl64
fl64 / disk.tf
Last active January 29, 2024 12:54
dvp terraform examples
resource "kubernetes_manifest" "vmd" {
manifest = {
"apiVersion" = "virtualization.deckhouse.io/v1alpha2"
"kind" = "VirtualMachineDisk"
"metadata" = {
"name" = var.root_disk_name
"namespace" = var.namespace
}