Skip to content

Instantly share code, notes, and snippets.

View jsturtevant's full-sized avatar
💻
right clicking and viewing the source

James Sturtevant jsturtevant

💻
right clicking and viewing the source
View GitHub Profile
@jsturtevant
jsturtevant / dns-startup.yaml
Created November 5, 2020 20:08
dns startup in windows containers
apiVersion: v1
kind: Pod
metadata:
name: dns-resolve
spec:
containers:
- name: test-resolve
image: mcr.microsoft.com/windows/servercore/iis:windowsservercore-ltsc2019
command: ["powershell.exe"]
args: ["/C", "for ($num = 1 ; $num -le 10000 ; $num++){ resolve-dnsname google.com }"]
@jsturtevant
jsturtevant / webrequest.ps1
Last active January 22, 2021 22:10
simplewebrequest.ps1
param ($url)
Invoke-WebRequest -UseBasicParsing -Uri $url
<?xml version="1.0"?>
<WindowsPerformanceRecorder Version="1">
<Profiles>
<EventCollector Id="Collector" Name="Collector">
<BufferSize Value="256"/>
<Buffers Value="1024"/>
</EventCollector>
<EventProvider Id="Microsoft.Virtualization.RunHCS" Name="0B52781F-B24D-5685-DDF6-69830ED40EC3"/>
package main
import (
"fmt"
"os"
"syscall"
"unsafe"
"golang.org/x/sys/windows"
)
@jsturtevant
jsturtevant / capz.sh
Last active October 9, 2023 18:26
windows.e2e
export E2E_ARGS="-kubetest.use-ci-artifacts"
export WINDOWS=true
export KUBERNETES_VERSION="latest"
export CONFORMANCE_NODES=4
export WINDOWS_FLAVOR=containerd
export SKIP_CLEANUP=true
./scripts/ci-conformance.sh
# once capz e2e managementcluster is created first time, add these envs:
@jsturtevant
jsturtevant / container-hp.json
Last active August 9, 2024 17:59
cri pod specs
{
"metadata": {
"name": "busybox"
},
"image":{
"image": "mcr.microsoft.com/windows/nanoserver:1809"
},
"command": [
"ping",
"-t",
@jsturtevant
jsturtevant / hpa.yaml
Last active May 12, 2021 22:06
windows metrics issue repo
kubectl run -i --tty load-generator --rm --image=busybox --restart=Never -- /bin/sh -c "while sleep 0.01; do wget -q -O- http://win-webserver; done"
disabled_plugins = []
imports = []
oom_score = 0
plugin_dir = ""
required_plugins = []
root = "C:\\ProgramData\\root"
state = "C:\\ProgramData\\state"
version = 2
[cgroup]
goroutine 3886 [select]:
github.com/containerd/ttrpc.(*Client).dispatch(0xc000440580, 0x22bf240, 0xc0008909c0, 0xc0005dc360, 0xc0000dd000, 0xc0009e9120, 0x5)
D:/a/containerd/containerd/src/github.com/containerd/containerd/vendor/github.com/containerd/ttrpc/client.go:155 +0x18c
github.com/containerd/ttrpc.defaultClientInterceptor(0x22bf240, 0xc0008909c0, 0xc0005dc360, 0xc0000dd000, 0xc0009e9110, 0xc0009e9120, 0x1e, 0x2030002)
D:/a/containerd/containerd/src/github.com/containerd/containerd/vendor/github.com/containerd/ttrpc/interceptor.go:49 +0x55
github.com/containerd/ttrpc.(*Client).Call(0xc000440580, 0x22bf240, 0xc0008909c0, 0x20bc79a, 0x17, 0x20a1a36, 0x5, 0x2009c80, 0xc000890b70, 0x2009dc0, ...)
D:/a/containerd/containerd/src/github.com/containerd/containerd/vendor/github.com/containerd/ttrpc/client.go:132 +0x33a
github.com/containerd/containerd/runtime/v2/task.(*taskClient).Stats(0xc000006e78, 0x22bf240, 0xc0008909c0, 0xc000890b70, 0xf, 0xd6c3ad, 0x6109a3fb)
D:/a/containerd
package main
import (
"bytes"
"flag"
"fmt"
"io/ioutil"
"log"
"math/rand"
"net/http"