From 13a7115d03105a9eefab4f6c0acd6ed73a05eacd Mon Sep 17 00:00:00 2001 From: Andy Yu Date: Tue, 24 Feb 2026 19:41:38 +1300 Subject: [PATCH] example of slowness due to lack of concurrency --- .../slow/slow-generator/kustomization.yaml | 15 +++++++++++++++ .../slow/slow-generator/slow-generator-1.yaml | 9 +++++++++ .../slow/slow-generator/slow-generator-10.yaml | 9 +++++++++ .../slow/slow-generator/slow-generator-2.yaml | 9 +++++++++ .../slow/slow-generator/slow-generator-3.yaml | 9 +++++++++ .../slow/slow-generator/slow-generator-4.yaml | 9 +++++++++ .../slow/slow-generator/slow-generator-5.yaml | 9 +++++++++ .../slow/slow-generator/slow-generator-6.yaml | 9 +++++++++ .../slow/slow-generator/slow-generator-7.yaml | 9 +++++++++ .../slow/slow-generator/slow-generator-8.yaml | 9 +++++++++ .../slow/slow-generator/slow-generator-9.yaml | 9 +++++++++ .../testdata/slow/slow-generator/slow.sh | 7 +++++++ 12 files changed, 112 insertions(+) create mode 100644 kustomizer/tests/kustomizer/testdata/slow/slow-generator/kustomization.yaml create mode 100644 kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-1.yaml create mode 100644 kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-10.yaml create mode 100644 kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-2.yaml create mode 100644 kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-3.yaml create mode 100644 kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-4.yaml create mode 100644 kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-5.yaml create mode 100644 kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-6.yaml create mode 100644 kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-7.yaml create mode 100644 kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-8.yaml create mode 100644 kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-9.yaml create mode 100755 kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow.sh diff --git a/kustomizer/tests/kustomizer/testdata/slow/slow-generator/kustomization.yaml b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/kustomization.yaml new file mode 100644 index 0000000..e7a5650 --- /dev/null +++ b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/kustomization.yaml @@ -0,0 +1,15 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +# kustomize builds serially (5s), but kustomizer builds concurrently (500ms). +generators: + - slow-generator-1.yaml + - slow-generator-2.yaml + - slow-generator-3.yaml + - slow-generator-4.yaml + - slow-generator-5.yaml + - slow-generator-6.yaml + - slow-generator-7.yaml + - slow-generator-8.yaml + - slow-generator-9.yaml + - slow-generator-10.yaml diff --git a/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-1.yaml b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-1.yaml new file mode 100644 index 0000000..c17963b --- /dev/null +++ b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-1.yaml @@ -0,0 +1,9 @@ +apiVersion: random +kind: Slow +metadata: + name: slow-1 + annotations: + config.kubernetes.io/function: | + exec: + path: sh + args: ["slow.sh"] diff --git a/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-10.yaml b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-10.yaml new file mode 100644 index 0000000..475102d --- /dev/null +++ b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-10.yaml @@ -0,0 +1,9 @@ +apiVersion: random +kind: Slow +metadata: + name: slow-10 + annotations: + config.kubernetes.io/function: | + exec: + path: sh + args: ["slow.sh"] diff --git a/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-2.yaml b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-2.yaml new file mode 100644 index 0000000..12bb7da --- /dev/null +++ b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-2.yaml @@ -0,0 +1,9 @@ +apiVersion: random +kind: Slow +metadata: + name: slow-2 + annotations: + config.kubernetes.io/function: | + exec: + path: sh + args: ["slow.sh"] diff --git a/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-3.yaml b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-3.yaml new file mode 100644 index 0000000..ac1d1d4 --- /dev/null +++ b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-3.yaml @@ -0,0 +1,9 @@ +apiVersion: random +kind: Slow +metadata: + name: slow-3 + annotations: + config.kubernetes.io/function: | + exec: + path: sh + args: ["slow.sh"] diff --git a/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-4.yaml b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-4.yaml new file mode 100644 index 0000000..1c789a7 --- /dev/null +++ b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-4.yaml @@ -0,0 +1,9 @@ +apiVersion: random +kind: Slow +metadata: + name: slow-4 + annotations: + config.kubernetes.io/function: | + exec: + path: sh + args: ["slow.sh"] diff --git a/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-5.yaml b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-5.yaml new file mode 100644 index 0000000..a0281b8 --- /dev/null +++ b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-5.yaml @@ -0,0 +1,9 @@ +apiVersion: random +kind: Slow +metadata: + name: slow-5 + annotations: + config.kubernetes.io/function: | + exec: + path: sh + args: ["slow.sh"] diff --git a/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-6.yaml b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-6.yaml new file mode 100644 index 0000000..a39af18 --- /dev/null +++ b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-6.yaml @@ -0,0 +1,9 @@ +apiVersion: random +kind: Slow +metadata: + name: slow-6 + annotations: + config.kubernetes.io/function: | + exec: + path: sh + args: ["slow.sh"] diff --git a/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-7.yaml b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-7.yaml new file mode 100644 index 0000000..607cfa3 --- /dev/null +++ b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-7.yaml @@ -0,0 +1,9 @@ +apiVersion: random +kind: Slow +metadata: + name: slow-7 + annotations: + config.kubernetes.io/function: | + exec: + path: sh + args: ["slow.sh"] diff --git a/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-8.yaml b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-8.yaml new file mode 100644 index 0000000..ba80650 --- /dev/null +++ b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-8.yaml @@ -0,0 +1,9 @@ +apiVersion: random +kind: Slow +metadata: + name: slow-8 + annotations: + config.kubernetes.io/function: | + exec: + path: sh + args: ["slow.sh"] diff --git a/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-9.yaml b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-9.yaml new file mode 100644 index 0000000..b5ff044 --- /dev/null +++ b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow-generator-9.yaml @@ -0,0 +1,9 @@ +apiVersion: random +kind: Slow +metadata: + name: slow-9 + annotations: + config.kubernetes.io/function: | + exec: + path: sh + args: ["slow.sh"] diff --git a/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow.sh b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow.sh new file mode 100755 index 0000000..04dd235 --- /dev/null +++ b/kustomizer/tests/kustomizer/testdata/slow/slow-generator/slow.sh @@ -0,0 +1,7 @@ +sleep "${1:-0.5}" + +echo " +apiVersion: config.kubernetes.io/v1 +kind: ResourceList +items: [] +"