From d5fa190e5b8203ad607a5699eeea7cb9d2ed94a5 Mon Sep 17 00:00:00 2001 From: Yuwen Ma Date: Wed, 3 Jul 2024 21:48:49 +0000 Subject: [PATCH] update golden log --- .../testdata/direct/simple1/expected.yaml | 48 ++---- .../testdata/direct/simple2/expected.yaml | 40 +---- .../testdata/direct/simple3/expected.yaml | 12 +- .../kubectl/simple1/expected-apiserver.yaml | 46 ++---- .../kubectl/simple2/expected-apiserver.yaml | 46 ++---- .../kubectl/simple3/expected-apiserver.yaml | 40 ++--- .../direct/create/expected-http.yaml | 139 +++++------------- .../reconcile/ssa/create/expected-http.yaml | 58 +++++--- 8 files changed, 140 insertions(+), 289 deletions(-) diff --git a/pkg/patterns/declarative/pkg/applier/testdata/direct/simple1/expected.yaml b/pkg/patterns/declarative/pkg/applier/testdata/direct/simple1/expected.yaml index 27f374c0..87524cba 100644 --- a/pkg/patterns/declarative/pkg/applier/testdata/direct/simple1/expected.yaml +++ b/pkg/patterns/declarative/pkg/applier/testdata/direct/simple1/expected.yaml @@ -11,62 +11,34 @@ Date: (removed) --- -GET http://kube-apiserver/api/v1/namespaces/ns1 +PATCH http://kube-apiserver/api/v1/namespaces/ns1?fieldManager=kubectl-client-side-apply&fieldValidation=Strict&force=false Accept: application/json +Content-Type: application/apply-patch+yaml -404 Not Found -Content-Length: 10 -Content-Type: text/plain; charset=utf-8 -Date: (removed) -X-Content-Type-Options: nosniff - -Not Found - - ---- - -POST http://kube-apiserver/api/v1/namespaces?fieldManager=kubectl-client-side-apply&fieldValidation=Strict -Accept: application/json -Content-Type: application/json - -{"apiVersion":"v1","kind":"Namespace","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"ns1\"}}\n"},"name":"ns1"}} +{"apiVersion":"v1","kind":"Namespace","metadata":{"name":"ns1"}} 200 OK Cache-Control: no-cache, private -Content-Length: 455 +Content-Length: 286 Content-Type: application/json Date: (removed) -{"apiVersion":"v1","kind":"Namespace","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"ns1\"}}\n"},"creationTimestamp":"2022-01-01T00:00:00Z","labels":{"kubernetes.io/metadata.name":"ns1"},"name":"ns1","resourceVersion":"1","uid":"00000000-0000-0000-0000-000000000001"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} +{"apiVersion":"v1","kind":"Namespace","metadata":{"creationTimestamp":"2022-01-01T00:00:00Z","labels":{"kubernetes.io/metadata.name":"ns1"},"name":"ns1","resourceVersion":"1","uid":"00000000-0000-0000-0000-000000000001"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} --- -GET http://kube-apiserver/api/v1/namespaces/ns2 +PATCH http://kube-apiserver/api/v1/namespaces/ns2?fieldManager=kubectl-client-side-apply&fieldValidation=Strict&force=false Accept: application/json +Content-Type: application/apply-patch+yaml -404 Not Found -Content-Length: 10 -Content-Type: text/plain; charset=utf-8 -Date: (removed) -X-Content-Type-Options: nosniff - -Not Found - - ---- - -POST http://kube-apiserver/api/v1/namespaces?fieldManager=kubectl-client-side-apply&fieldValidation=Strict -Accept: application/json -Content-Type: application/json - -{"apiVersion":"v1","kind":"Namespace","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"ns2\"}}\n"},"name":"ns2"}} +{"apiVersion":"v1","kind":"Namespace","metadata":{"name":"ns2"}} 200 OK Cache-Control: no-cache, private -Content-Length: 455 +Content-Length: 286 Content-Type: application/json Date: (removed) -{"apiVersion":"v1","kind":"Namespace","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"ns2\"}}\n"},"creationTimestamp":"2022-01-01T00:00:01Z","labels":{"kubernetes.io/metadata.name":"ns2"},"name":"ns2","resourceVersion":"2","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} +{"apiVersion":"v1","kind":"Namespace","metadata":{"creationTimestamp":"2022-01-01T00:00:01Z","labels":{"kubernetes.io/metadata.name":"ns2"},"name":"ns2","resourceVersion":"2","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} diff --git a/pkg/patterns/declarative/pkg/applier/testdata/direct/simple2/expected.yaml b/pkg/patterns/declarative/pkg/applier/testdata/direct/simple2/expected.yaml index 0168b769..87524cba 100644 --- a/pkg/patterns/declarative/pkg/applier/testdata/direct/simple2/expected.yaml +++ b/pkg/patterns/declarative/pkg/applier/testdata/direct/simple2/expected.yaml @@ -11,8 +11,12 @@ Date: (removed) --- -GET http://kube-apiserver/api/v1/namespaces/ns1 +PATCH http://kube-apiserver/api/v1/namespaces/ns1?fieldManager=kubectl-client-side-apply&fieldValidation=Strict&force=false Accept: application/json +Content-Type: application/apply-patch+yaml + +{"apiVersion":"v1","kind":"Namespace","metadata":{"name":"ns1"}} + 200 OK Cache-Control: no-cache, private @@ -24,24 +28,12 @@ Date: (removed) --- -PATCH http://kube-apiserver/api/v1/namespaces/ns1?fieldManager=kubectl-client-side-apply&fieldValidation=Strict +PATCH http://kube-apiserver/api/v1/namespaces/ns2?fieldManager=kubectl-client-side-apply&fieldValidation=Strict&force=false Accept: application/json -Content-Type: application/strategic-merge-patch+json +Content-Type: application/apply-patch+yaml -{"metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"ns1\"}}\n"}}} +{"apiVersion":"v1","kind":"Namespace","metadata":{"name":"ns2"}} -200 OK -Cache-Control: no-cache, private -Content-Length: 677 -Content-Type: application/json -Date: (removed) - -{"apiVersion":"v1","kind":"Namespace","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"ns1\"}}\n"},"creationTimestamp":"2022-01-01T00:00:00Z","labels":{"kubernetes.io/metadata.name":"ns1"},"managedFields":[{"apiVersion":"v1","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{"f:kubectl.kubernetes.io/last-applied-configuration":{}}}},"manager":"kubectl-client-side-apply","operation":"Apply"}],"name":"ns1","resourceVersion":"3","uid":"00000000-0000-0000-0000-000000000001"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} - ---- - -GET http://kube-apiserver/api/v1/namespaces/ns2 -Accept: application/json 200 OK Cache-Control: no-cache, private @@ -50,19 +42,3 @@ Content-Type: application/json Date: (removed) {"apiVersion":"v1","kind":"Namespace","metadata":{"creationTimestamp":"2022-01-01T00:00:01Z","labels":{"kubernetes.io/metadata.name":"ns2"},"name":"ns2","resourceVersion":"2","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} - ---- - -PATCH http://kube-apiserver/api/v1/namespaces/ns2?fieldManager=kubectl-client-side-apply&fieldValidation=Strict -Accept: application/json -Content-Type: application/strategic-merge-patch+json - -{"metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"ns2\"}}\n"}}} - -200 OK -Cache-Control: no-cache, private -Content-Length: 677 -Content-Type: application/json -Date: (removed) - -{"apiVersion":"v1","kind":"Namespace","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"ns2\"}}\n"},"creationTimestamp":"2022-01-01T00:00:01Z","labels":{"kubernetes.io/metadata.name":"ns2"},"managedFields":[{"apiVersion":"v1","fieldsType":"FieldsV1","fieldsV1":{"f:metadata":{"f:annotations":{"f:kubectl.kubernetes.io/last-applied-configuration":{}}}},"manager":"kubectl-client-side-apply","operation":"Apply"}],"name":"ns2","resourceVersion":"4","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} diff --git a/pkg/patterns/declarative/pkg/applier/testdata/direct/simple3/expected.yaml b/pkg/patterns/declarative/pkg/applier/testdata/direct/simple3/expected.yaml index f7b9a37a..21a24a68 100644 --- a/pkg/patterns/declarative/pkg/applier/testdata/direct/simple3/expected.yaml +++ b/pkg/patterns/declarative/pkg/applier/testdata/direct/simple3/expected.yaml @@ -11,8 +11,12 @@ Date: (removed) --- -GET http://kube-apiserver/api/v1/namespaces/ns1 +PATCH http://kube-apiserver/api/v1/namespaces/ns1?fieldManager=kubectl-client-side-apply&fieldValidation=Strict&force=false Accept: application/json +Content-Type: application/apply-patch+yaml + +{"apiVersion":"v1","kind":"Namespace","metadata":{"name":"ns1"}} + 200 OK Cache-Control: no-cache, private @@ -24,8 +28,12 @@ Date: (removed) --- -GET http://kube-apiserver/api/v1/namespaces/ns2 +PATCH http://kube-apiserver/api/v1/namespaces/ns2?fieldManager=kubectl-client-side-apply&fieldValidation=Strict&force=false Accept: application/json +Content-Type: application/apply-patch+yaml + +{"apiVersion":"v1","kind":"Namespace","metadata":{"name":"ns2"}} + 200 OK Cache-Control: no-cache, private diff --git a/pkg/patterns/declarative/pkg/applier/testdata/kubectl/simple1/expected-apiserver.yaml b/pkg/patterns/declarative/pkg/applier/testdata/kubectl/simple1/expected-apiserver.yaml index 70f1a64b..276f9c2d 100644 --- a/pkg/patterns/declarative/pkg/applier/testdata/kubectl/simple1/expected-apiserver.yaml +++ b/pkg/patterns/declarative/pkg/applier/testdata/kubectl/simple1/expected-apiserver.yaml @@ -10,7 +10,6 @@ Accept-Encoding: gzip GET /openapi/v2?timeout=32s Accept: application/com.github.proto-openapi.spec.v2@v1.0+protobuf Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -18,9 +17,17 @@ Kubectl-Command: kubectl apply --- GET /api?timeout=32s -Accept: application/json;g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList,application/json +Accept: application/json, */* +Accept-Encoding: gzip + + + + +--- + +GET /api/v1?timeout=32s +Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -30,7 +37,6 @@ Kubectl-Command: kubectl apply GET /api/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -38,9 +44,8 @@ Kubectl-Command: kubectl apply --- GET /apis?timeout=32s -Accept: application/json;g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList,application/json +Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -50,7 +55,6 @@ Kubectl-Command: kubectl apply GET /apis/admissionregistration.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -60,7 +64,6 @@ Kubectl-Command: kubectl apply GET /apis/apiextensions.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -70,7 +73,6 @@ Kubectl-Command: kubectl apply GET /apis/apiregistration.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -80,7 +82,6 @@ Kubectl-Command: kubectl apply GET /apis/apps/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -90,7 +91,6 @@ Kubectl-Command: kubectl apply GET /apis/autoscaling/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -100,7 +100,6 @@ Kubectl-Command: kubectl apply GET /apis/autoscaling/v2?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -110,7 +109,6 @@ Kubectl-Command: kubectl apply GET /apis/autoscaling/v2beta2?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -120,7 +118,6 @@ Kubectl-Command: kubectl apply GET /apis/batch/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -130,7 +127,6 @@ Kubectl-Command: kubectl apply GET /apis/certificates.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -140,7 +136,6 @@ Kubectl-Command: kubectl apply GET /apis/coordination.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -150,7 +145,6 @@ Kubectl-Command: kubectl apply GET /apis/discovery.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -160,7 +154,6 @@ Kubectl-Command: kubectl apply GET /apis/events.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -170,7 +163,6 @@ Kubectl-Command: kubectl apply GET /apis/flowcontrol.apiserver.k8s.io/v1beta1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -180,7 +172,6 @@ Kubectl-Command: kubectl apply GET /apis/flowcontrol.apiserver.k8s.io/v1beta2?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -190,7 +181,6 @@ Kubectl-Command: kubectl apply GET /apis/networking.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -200,7 +190,6 @@ Kubectl-Command: kubectl apply GET /apis/node.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -210,7 +199,6 @@ Kubectl-Command: kubectl apply GET /apis/policy/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -220,7 +208,6 @@ Kubectl-Command: kubectl apply GET /apis/rbac.authorization.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -230,7 +217,6 @@ Kubectl-Command: kubectl apply GET /apis/scheduling.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -240,7 +226,6 @@ Kubectl-Command: kubectl apply GET /apis/storage.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -250,7 +235,6 @@ Kubectl-Command: kubectl apply GET /apis/storage.k8s.io/v1beta1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -260,19 +244,17 @@ Kubectl-Command: kubectl apply GET /api/v1/namespaces/ns1 Accept: application/json Accept-Encoding: gzip -Kubectl-Command: kubectl apply --- -POST /api/v1/namespaces?fieldManager=kubectl-client-side-apply&fieldValidation=Ignore +POST /api/v1/namespaces Accept: application/json Accept-Encoding: gzip Content-Length: 234 Content-Type: application/json -Kubectl-Command: kubectl apply {"apiVersion":"v1","kind":"Namespace","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"ns1\"}}\n"},"name":"ns1"}} @@ -285,19 +267,17 @@ Kubectl-Command: kubectl apply GET /api/v1/namespaces/ns2 Accept: application/json Accept-Encoding: gzip -Kubectl-Command: kubectl apply --- -POST /api/v1/namespaces?fieldManager=kubectl-client-side-apply&fieldValidation=Ignore +POST /api/v1/namespaces Accept: application/json Accept-Encoding: gzip Content-Length: 234 Content-Type: application/json -Kubectl-Command: kubectl apply {"apiVersion":"v1","kind":"Namespace","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"ns2\"}}\n"},"name":"ns2"}} diff --git a/pkg/patterns/declarative/pkg/applier/testdata/kubectl/simple2/expected-apiserver.yaml b/pkg/patterns/declarative/pkg/applier/testdata/kubectl/simple2/expected-apiserver.yaml index 8f4ce0ca..3a923e4f 100644 --- a/pkg/patterns/declarative/pkg/applier/testdata/kubectl/simple2/expected-apiserver.yaml +++ b/pkg/patterns/declarative/pkg/applier/testdata/kubectl/simple2/expected-apiserver.yaml @@ -10,7 +10,6 @@ Accept-Encoding: gzip GET /openapi/v2?timeout=32s Accept: application/com.github.proto-openapi.spec.v2@v1.0+protobuf Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -18,9 +17,17 @@ Kubectl-Command: kubectl apply --- GET /api?timeout=32s -Accept: application/json;g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList,application/json +Accept: application/json, */* +Accept-Encoding: gzip + + + + +--- + +GET /api/v1?timeout=32s +Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -30,7 +37,6 @@ Kubectl-Command: kubectl apply GET /api/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -38,9 +44,8 @@ Kubectl-Command: kubectl apply --- GET /apis?timeout=32s -Accept: application/json;g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList,application/json +Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -50,7 +55,6 @@ Kubectl-Command: kubectl apply GET /apis/admissionregistration.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -60,7 +64,6 @@ Kubectl-Command: kubectl apply GET /apis/apiextensions.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -70,7 +73,6 @@ Kubectl-Command: kubectl apply GET /apis/apiregistration.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -80,7 +82,6 @@ Kubectl-Command: kubectl apply GET /apis/apps/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -90,7 +91,6 @@ Kubectl-Command: kubectl apply GET /apis/autoscaling/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -100,7 +100,6 @@ Kubectl-Command: kubectl apply GET /apis/autoscaling/v2?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -110,7 +109,6 @@ Kubectl-Command: kubectl apply GET /apis/autoscaling/v2beta2?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -120,7 +118,6 @@ Kubectl-Command: kubectl apply GET /apis/batch/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -130,7 +127,6 @@ Kubectl-Command: kubectl apply GET /apis/certificates.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -140,7 +136,6 @@ Kubectl-Command: kubectl apply GET /apis/coordination.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -150,7 +145,6 @@ Kubectl-Command: kubectl apply GET /apis/discovery.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -160,7 +154,6 @@ Kubectl-Command: kubectl apply GET /apis/events.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -170,7 +163,6 @@ Kubectl-Command: kubectl apply GET /apis/flowcontrol.apiserver.k8s.io/v1beta1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -180,7 +172,6 @@ Kubectl-Command: kubectl apply GET /apis/flowcontrol.apiserver.k8s.io/v1beta2?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -190,7 +181,6 @@ Kubectl-Command: kubectl apply GET /apis/networking.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -200,7 +190,6 @@ Kubectl-Command: kubectl apply GET /apis/node.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -210,7 +199,6 @@ Kubectl-Command: kubectl apply GET /apis/policy/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -220,7 +208,6 @@ Kubectl-Command: kubectl apply GET /apis/rbac.authorization.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -230,7 +217,6 @@ Kubectl-Command: kubectl apply GET /apis/scheduling.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -240,7 +226,6 @@ Kubectl-Command: kubectl apply GET /apis/storage.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -250,7 +235,6 @@ Kubectl-Command: kubectl apply GET /apis/storage.k8s.io/v1beta1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -260,19 +244,17 @@ Kubectl-Command: kubectl apply GET /api/v1/namespaces/ns1 Accept: application/json Accept-Encoding: gzip -Kubectl-Command: kubectl apply --- -PATCH /api/v1/namespaces/ns1?fieldManager=kubectl-client-side-apply&fieldValidation=Ignore +PATCH /api/v1/namespaces/ns1 Accept: application/json Accept-Encoding: gzip Content-Length: 183 Content-Type: application/strategic-merge-patch+json -Kubectl-Command: kubectl apply {"metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"ns1\"}}\n"}}} @@ -284,19 +266,17 @@ Kubectl-Command: kubectl apply GET /api/v1/namespaces/ns2 Accept: application/json Accept-Encoding: gzip -Kubectl-Command: kubectl apply --- -PATCH /api/v1/namespaces/ns2?fieldManager=kubectl-client-side-apply&fieldValidation=Ignore +PATCH /api/v1/namespaces/ns2 Accept: application/json Accept-Encoding: gzip Content-Length: 183 Content-Type: application/strategic-merge-patch+json -Kubectl-Command: kubectl apply {"metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"Namespace\",\"metadata\":{\"annotations\":{},\"name\":\"ns2\"}}\n"}}} diff --git a/pkg/patterns/declarative/pkg/applier/testdata/kubectl/simple3/expected-apiserver.yaml b/pkg/patterns/declarative/pkg/applier/testdata/kubectl/simple3/expected-apiserver.yaml index 352c9054..7cc3b31b 100644 --- a/pkg/patterns/declarative/pkg/applier/testdata/kubectl/simple3/expected-apiserver.yaml +++ b/pkg/patterns/declarative/pkg/applier/testdata/kubectl/simple3/expected-apiserver.yaml @@ -10,7 +10,6 @@ Accept-Encoding: gzip GET /openapi/v2?timeout=32s Accept: application/com.github.proto-openapi.spec.v2@v1.0+protobuf Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -18,9 +17,17 @@ Kubectl-Command: kubectl apply --- GET /api?timeout=32s -Accept: application/json;g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList,application/json +Accept: application/json, */* +Accept-Encoding: gzip + + + + +--- + +GET /api/v1?timeout=32s +Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -30,7 +37,6 @@ Kubectl-Command: kubectl apply GET /api/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -38,9 +44,8 @@ Kubectl-Command: kubectl apply --- GET /apis?timeout=32s -Accept: application/json;g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryList,application/json +Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -50,7 +55,6 @@ Kubectl-Command: kubectl apply GET /apis/admissionregistration.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -60,7 +64,6 @@ Kubectl-Command: kubectl apply GET /apis/apiextensions.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -70,7 +73,6 @@ Kubectl-Command: kubectl apply GET /apis/apiregistration.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -80,7 +82,6 @@ Kubectl-Command: kubectl apply GET /apis/apps/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -90,7 +91,6 @@ Kubectl-Command: kubectl apply GET /apis/autoscaling/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -100,7 +100,6 @@ Kubectl-Command: kubectl apply GET /apis/autoscaling/v2?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -110,7 +109,6 @@ Kubectl-Command: kubectl apply GET /apis/autoscaling/v2beta2?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -120,7 +118,6 @@ Kubectl-Command: kubectl apply GET /apis/batch/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -130,7 +127,6 @@ Kubectl-Command: kubectl apply GET /apis/certificates.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -140,7 +136,6 @@ Kubectl-Command: kubectl apply GET /apis/coordination.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -150,7 +145,6 @@ Kubectl-Command: kubectl apply GET /apis/discovery.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -160,7 +154,6 @@ Kubectl-Command: kubectl apply GET /apis/events.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -170,7 +163,6 @@ Kubectl-Command: kubectl apply GET /apis/flowcontrol.apiserver.k8s.io/v1beta1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -180,7 +172,6 @@ Kubectl-Command: kubectl apply GET /apis/flowcontrol.apiserver.k8s.io/v1beta2?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -190,7 +181,6 @@ Kubectl-Command: kubectl apply GET /apis/networking.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -200,7 +190,6 @@ Kubectl-Command: kubectl apply GET /apis/node.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -210,7 +199,6 @@ Kubectl-Command: kubectl apply GET /apis/policy/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -220,7 +208,6 @@ Kubectl-Command: kubectl apply GET /apis/rbac.authorization.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -230,7 +217,6 @@ Kubectl-Command: kubectl apply GET /apis/scheduling.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -240,7 +226,6 @@ Kubectl-Command: kubectl apply GET /apis/storage.k8s.io/v1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -250,7 +235,6 @@ Kubectl-Command: kubectl apply GET /apis/storage.k8s.io/v1beta1?timeout=32s Accept: application/json, */* Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -260,7 +244,6 @@ Kubectl-Command: kubectl apply GET /api/v1/namespaces/ns1 Accept: application/json Accept-Encoding: gzip -Kubectl-Command: kubectl apply @@ -270,7 +253,6 @@ Kubectl-Command: kubectl apply GET /api/v1/namespaces/ns2 Accept: application/json Accept-Encoding: gzip -Kubectl-Command: kubectl apply diff --git a/pkg/test/testreconciler/simpletest/testdata/reconcile/direct/create/expected-http.yaml b/pkg/test/testreconciler/simpletest/testdata/reconcile/direct/create/expected-http.yaml index 2db23713..8276ed2c 100644 --- a/pkg/test/testreconciler/simpletest/testdata/reconcile/direct/create/expected-http.yaml +++ b/pkg/test/testreconciler/simpletest/testdata/reconcile/direct/create/expected-http.yaml @@ -16,15 +16,15 @@ Accept: application/json, */* 200 OK Cache-Control: no-cache, private -Content-Length: 379 +Content-Length: 364 Content-Type: application/json Date: (removed) -{"apiVersion":"addons.example.org/v1alpha1","items":[{"apiVersion":"addons.example.org/v1alpha1","kind":"SimpleTest","metadata":{"creationTimestamp":"2022-01-01T00:00:01Z","generation":1,"name":"simple1","namespace":"ns1","resourceVersion":"2","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"channel":"stable"}}],"kind":"SimpleTestList","metadata":{"resourceVersion":"2"}} +{"apiVersion":"addons.example.org/v1alpha1","items":[{"apiVersion":"addons.example.org/v1alpha1","kind":"SimpleTest","metadata":{"creationTimestamp":"2022-01-01T00:00:01Z","name":"simple1","namespace":"ns1","resourceVersion":"2","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"channel":"stable"}}],"kind":"SimpleTestList","metadata":{"resourceVersion":"3"}} --- -GET http://kube-apiserver/apis/addons.example.org/v1alpha1/simpletests?allowWatchBookmarks=true&resourceVersion=2&timeoutSeconds=&watch=true +GET http://kube-apiserver/apis/addons.example.org/v1alpha1/simpletests?allowWatchBookmarks=true&resourceVersion=3&timeoutSeconds=&watch=true Accept: application/json, */* 200 OK @@ -114,91 +114,37 @@ Date: (removed) --- -GET http://kube-apiserver/api/v1/namespaces/ns1/configmaps/foo -Accept: application/json - -404 Not Found -Content-Length: 10 -Content-Type: text/plain; charset=utf-8 -Date: (removed) -X-Content-Type-Options: nosniff - -Not Found - - ---- - -GET http://kube-apiserver/api/v1/namespaces/ns1 -Accept: application/json - -200 OK -Cache-Control: no-cache, private -Content-Length: 286 -Content-Type: application/json -Date: (removed) - -{"apiVersion":"v1","kind":"Namespace","metadata":{"creationTimestamp":"2022-01-01T00:00:00Z","labels":{"kubernetes.io/metadata.name":"ns1"},"name":"ns1","resourceVersion":"1","uid":"00000000-0000-0000-0000-000000000001"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} - ---- - -POST http://kube-apiserver/api/v1/namespaces/ns1/configmaps?fieldManager=kubectl-client-side-apply&fieldValidation=Strict -Accept: application/json -Content-Type: application/json - -{"apiVersion":"v1","data":{"k1":"v1"},"kind":"ConfigMap","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"data\":{\"k1\":\"v1\"},\"kind\":\"ConfigMap\",\"metadata\":{\"annotations\":{},\"labels\":{\"addons.example.org/simpletest\":\"simple1\",\"example-app\":\"simpletest\",\"l1\":\"v1\"},\"name\":\"foo\",\"namespace\":\"ns1\",\"ownerReferences\":[{\"apiVersion\":\"addons.example.org/v1alpha1\",\"blockOwnerDeletion\":true,\"controller\":true,\"kind\":\"SimpleTest\",\"name\":\"simple1\",\"uid\":\"00000000-0000-0000-0000-000000000002\"}]}}\n"},"labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest","l1":"v1"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}]}} - - -200 OK -Cache-Control: no-cache, private -Content-Length: 1025 -Content-Type: application/json -Date: (removed) - -{"apiVersion":"v1","data":{"k1":"v1"},"kind":"ConfigMap","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"data\":{\"k1\":\"v1\"},\"kind\":\"ConfigMap\",\"metadata\":{\"annotations\":{},\"labels\":{\"addons.example.org/simpletest\":\"simple1\",\"example-app\":\"simpletest\",\"l1\":\"v1\"},\"name\":\"foo\",\"namespace\":\"ns1\",\"ownerReferences\":[{\"apiVersion\":\"addons.example.org/v1alpha1\",\"blockOwnerDeletion\":true,\"controller\":true,\"kind\":\"SimpleTest\",\"name\":\"simple1\",\"uid\":\"00000000-0000-0000-0000-000000000002\"}]}}\n"},"creationTimestamp":"2022-01-01T00:00:02Z","labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest","l1":"v1"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"3","uid":"00000000-0000-0000-0000-000000000003"}} - ---- - -GET http://kube-apiserver/apis/apps/v1/namespaces/ns1/deployments/mydeployment +PATCH http://kube-apiserver/api/v1/namespaces/ns1/configmaps/foo?fieldManager=kubectl-client-side-apply&fieldValidation=Strict&force=true Accept: application/json +Content-Type: application/apply-patch+yaml -404 Not Found -Content-Length: 10 -Content-Type: text/plain; charset=utf-8 -Date: (removed) -X-Content-Type-Options: nosniff - -Not Found - +{"apiVersion":"v1","data":{"k1":"v1"},"kind":"ConfigMap","metadata":{"labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest","l1":"v1"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}]}} ---- - -GET http://kube-apiserver/api/v1/namespaces/ns1 -Accept: application/json 200 OK Cache-Control: no-cache, private -Content-Length: 286 +Content-Length: 492 Content-Type: application/json Date: (removed) -{"apiVersion":"v1","kind":"Namespace","metadata":{"creationTimestamp":"2022-01-01T00:00:00Z","labels":{"kubernetes.io/metadata.name":"ns1"},"name":"ns1","resourceVersion":"1","uid":"00000000-0000-0000-0000-000000000001"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} +{"apiVersion":"v1","data":{"k1":"v1"},"kind":"ConfigMap","metadata":{"creationTimestamp":"2022-01-01T00:00:02Z","labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest","l1":"v1"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"3","uid":"00000000-0000-0000-0000-000000000003"}} --- -POST http://kube-apiserver/apis/apps/v1/namespaces/ns1/deployments?fieldManager=kubectl-client-side-apply&fieldValidation=Strict +PATCH http://kube-apiserver/apis/apps/v1/namespaces/ns1/deployments/mydeployment?fieldManager=kubectl-client-side-apply&fieldValidation=Strict&force=true Accept: application/json -Content-Type: application/json +Content-Type: application/apply-patch+yaml -{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"annotations\":{},\"labels\":{\"addons.example.org/simpletest\":\"simple1\",\"example-app\":\"simpletest\"},\"name\":\"mydeployment\",\"namespace\":\"ns1\",\"ownerReferences\":[{\"apiVersion\":\"addons.example.org/v1alpha1\",\"blockOwnerDeletion\":true,\"controller\":true,\"kind\":\"SimpleTest\",\"name\":\"simple1\",\"uid\":\"00000000-0000-0000-0000-000000000002\"}]},\"spec\":{\"replicas\":3,\"selector\":{\"matchLabels\":{\"app\":\"bar\"}},\"template\":{\"metadata\":{\"labels\":{\"app\":\"bar\"}},\"spec\":{\"containers\":[{\"image\":\"registry.k8s.io/pause:3.9\",\"name\":\"main\"}]}}}}\n"},"labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}]},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}}} +{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}]},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}}} 200 OK Cache-Control: no-cache, private -Content-Length: 1680 +Content-Length: 666 Content-Type: application/json Date: (removed) -{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"annotations\":{},\"labels\":{\"addons.example.org/simpletest\":\"simple1\",\"example-app\":\"simpletest\"},\"name\":\"mydeployment\",\"namespace\":\"ns1\",\"ownerReferences\":[{\"apiVersion\":\"addons.example.org/v1alpha1\",\"blockOwnerDeletion\":true,\"controller\":true,\"kind\":\"SimpleTest\",\"name\":\"simple1\",\"uid\":\"00000000-0000-0000-0000-000000000002\"}]},\"spec\":{\"replicas\":3,\"selector\":{\"matchLabels\":{\"app\":\"bar\"}},\"template\":{\"metadata\":{\"labels\":{\"app\":\"bar\"}},\"spec\":{\"containers\":[{\"image\":\"registry.k8s.io/pause:3.9\",\"name\":\"main\"}]}}}}\n"},"creationTimestamp":"2022-01-01T00:00:03Z","generation":1,"labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"4","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}},"status":{"availableReplicas":3,"conditions":[{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"MinimumReplicasAvailable","status":"True","type":"Available"},{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"NewReplicaSetAvailable","status":"True","type":"Progressing"}],"observedGeneration":1,"readyReplicas":3,"replicas":3,"updatedReplicas":3}} +{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"creationTimestamp":"2022-01-01T00:00:03Z","labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"4","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}}} --- @@ -207,11 +153,11 @@ Accept: application/json 200 OK Cache-Control: no-cache, private -Content-Length: 1680 +Content-Length: 666 Content-Type: application/json Date: (removed) -{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"annotations\":{},\"labels\":{\"addons.example.org/simpletest\":\"simple1\",\"example-app\":\"simpletest\"},\"name\":\"mydeployment\",\"namespace\":\"ns1\",\"ownerReferences\":[{\"apiVersion\":\"addons.example.org/v1alpha1\",\"blockOwnerDeletion\":true,\"controller\":true,\"kind\":\"SimpleTest\",\"name\":\"simple1\",\"uid\":\"00000000-0000-0000-0000-000000000002\"}]},\"spec\":{\"replicas\":3,\"selector\":{\"matchLabels\":{\"app\":\"bar\"}},\"template\":{\"metadata\":{\"labels\":{\"app\":\"bar\"}},\"spec\":{\"containers\":[{\"image\":\"registry.k8s.io/pause:3.9\",\"name\":\"main\"}]}}}}\n"},"creationTimestamp":"2022-01-01T00:00:03Z","generation":1,"labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"4","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}},"status":{"availableReplicas":3,"conditions":[{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"MinimumReplicasAvailable","status":"True","type":"Available"},{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"NewReplicaSetAvailable","status":"True","type":"Progressing"}],"observedGeneration":1,"readyReplicas":3,"replicas":3,"updatedReplicas":3}} +{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"creationTimestamp":"2022-01-01T00:00:03Z","labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"4","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}}} --- @@ -219,16 +165,16 @@ PUT http://kube-apiserver/apis/addons.example.org/v1alpha1/namespaces/ns1/simple Accept: application/json, */* Content-Type: application/json -{"kind":"SimpleTest","apiVersion":"addons.example.org/v1alpha1","metadata":{"name":"simple1","namespace":"ns1","uid":"00000000-0000-0000-0000-000000000002","resourceVersion":"2","generation":1,"creationTimestamp":"2022-01-01T00:00:01Z"},"spec":{"channel":"stable"},"status":{"healthy":true}} +{"kind":"SimpleTest","apiVersion":"addons.example.org/v1alpha1","metadata":{"name":"simple1","namespace":"ns1","uid":"00000000-0000-0000-0000-000000000002","resourceVersion":"2","creationTimestamp":"2022-01-01T00:00:01Z"},"spec":{"channel":"stable"},"status":{"healthy":false,"errors":["deployment does not meet condition: Available"]}} 200 OK Cache-Control: no-cache, private -Content-Length: 291 +Content-Length: 336 Content-Type: application/json Date: (removed) -{"apiVersion":"addons.example.org/v1alpha1","kind":"SimpleTest","metadata":{"creationTimestamp":"2022-01-01T00:00:01Z","generation":1,"name":"simple1","namespace":"ns1","resourceVersion":"5","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"channel":"stable"},"status":{"healthy":true}} +{"apiVersion":"addons.example.org/v1alpha1","kind":"SimpleTest","metadata":{"creationTimestamp":"2022-01-01T00:00:01Z","name":"simple1","namespace":"ns1","resourceVersion":"5","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"channel":"stable"},"status":{"errors":["deployment does not meet condition: Available"],"healthy":false}} --- @@ -237,11 +183,11 @@ Accept: application/json 200 OK Cache-Control: no-cache, private -Content-Length: 1025 +Content-Length: 492 Content-Type: application/json Date: (removed) -{"apiVersion":"v1","data":{"k1":"v1"},"kind":"ConfigMap","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"data\":{\"k1\":\"v1\"},\"kind\":\"ConfigMap\",\"metadata\":{\"annotations\":{},\"labels\":{\"addons.example.org/simpletest\":\"simple1\",\"example-app\":\"simpletest\",\"l1\":\"v1\"},\"name\":\"foo\",\"namespace\":\"ns1\",\"ownerReferences\":[{\"apiVersion\":\"addons.example.org/v1alpha1\",\"blockOwnerDeletion\":true,\"controller\":true,\"kind\":\"SimpleTest\",\"name\":\"simple1\",\"uid\":\"00000000-0000-0000-0000-000000000002\"}]}}\n"},"creationTimestamp":"2022-01-01T00:00:02Z","labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest","l1":"v1"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"3","uid":"00000000-0000-0000-0000-000000000003"}} +{"apiVersion":"v1","data":{"k1":"v1"},"kind":"ConfigMap","metadata":{"creationTimestamp":"2022-01-01T00:00:02Z","labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest","l1":"v1"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"3","uid":"00000000-0000-0000-0000-000000000003"}} --- @@ -250,64 +196,55 @@ Accept: application/json 200 OK Cache-Control: no-cache, private -Content-Length: 1680 +Content-Length: 666 Content-Type: application/json Date: (removed) -{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"annotations\":{},\"labels\":{\"addons.example.org/simpletest\":\"simple1\",\"example-app\":\"simpletest\"},\"name\":\"mydeployment\",\"namespace\":\"ns1\",\"ownerReferences\":[{\"apiVersion\":\"addons.example.org/v1alpha1\",\"blockOwnerDeletion\":true,\"controller\":true,\"kind\":\"SimpleTest\",\"name\":\"simple1\",\"uid\":\"00000000-0000-0000-0000-000000000002\"}]},\"spec\":{\"replicas\":3,\"selector\":{\"matchLabels\":{\"app\":\"bar\"}},\"template\":{\"metadata\":{\"labels\":{\"app\":\"bar\"}},\"spec\":{\"containers\":[{\"image\":\"registry.k8s.io/pause:3.9\",\"name\":\"main\"}]}}}}\n"},"creationTimestamp":"2022-01-01T00:00:03Z","generation":1,"labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"4","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}},"status":{"availableReplicas":3,"conditions":[{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"MinimumReplicasAvailable","status":"True","type":"Available"},{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"NewReplicaSetAvailable","status":"True","type":"Progressing"}],"observedGeneration":1,"readyReplicas":3,"replicas":3,"updatedReplicas":3}} +{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"creationTimestamp":"2022-01-01T00:00:03Z","labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"4","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}}} --- -GET http://kube-apiserver/api/v1/namespaces/ns1/configmaps/foo +PATCH http://kube-apiserver/api/v1/namespaces/ns1/configmaps/foo?fieldManager=kubectl-client-side-apply&fieldValidation=Strict&force=true Accept: application/json +Content-Type: application/apply-patch+yaml -200 OK -Cache-Control: no-cache, private -Content-Length: 1025 -Content-Type: application/json -Date: (removed) +{"apiVersion":"v1","data":{"k1":"v1"},"kind":"ConfigMap","metadata":{"labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest","l1":"v1"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}]}} -{"apiVersion":"v1","data":{"k1":"v1"},"kind":"ConfigMap","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"data\":{\"k1\":\"v1\"},\"kind\":\"ConfigMap\",\"metadata\":{\"annotations\":{},\"labels\":{\"addons.example.org/simpletest\":\"simple1\",\"example-app\":\"simpletest\",\"l1\":\"v1\"},\"name\":\"foo\",\"namespace\":\"ns1\",\"ownerReferences\":[{\"apiVersion\":\"addons.example.org/v1alpha1\",\"blockOwnerDeletion\":true,\"controller\":true,\"kind\":\"SimpleTest\",\"name\":\"simple1\",\"uid\":\"00000000-0000-0000-0000-000000000002\"}]}}\n"},"creationTimestamp":"2022-01-01T00:00:02Z","labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest","l1":"v1"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"3","uid":"00000000-0000-0000-0000-000000000003"}} - ---- - -GET http://kube-apiserver/apis/apps/v1/namespaces/ns1/deployments/mydeployment -Accept: application/json 200 OK Cache-Control: no-cache, private -Content-Length: 1680 +Content-Length: 492 Content-Type: application/json Date: (removed) -{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"annotations\":{},\"labels\":{\"addons.example.org/simpletest\":\"simple1\",\"example-app\":\"simpletest\"},\"name\":\"mydeployment\",\"namespace\":\"ns1\",\"ownerReferences\":[{\"apiVersion\":\"addons.example.org/v1alpha1\",\"blockOwnerDeletion\":true,\"controller\":true,\"kind\":\"SimpleTest\",\"name\":\"simple1\",\"uid\":\"00000000-0000-0000-0000-000000000002\"}]},\"spec\":{\"replicas\":3,\"selector\":{\"matchLabels\":{\"app\":\"bar\"}},\"template\":{\"metadata\":{\"labels\":{\"app\":\"bar\"}},\"spec\":{\"containers\":[{\"image\":\"registry.k8s.io/pause:3.9\",\"name\":\"main\"}]}}}}\n"},"creationTimestamp":"2022-01-01T00:00:03Z","generation":1,"labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"4","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}},"status":{"availableReplicas":3,"conditions":[{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"MinimumReplicasAvailable","status":"True","type":"Available"},{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"NewReplicaSetAvailable","status":"True","type":"Progressing"}],"observedGeneration":1,"readyReplicas":3,"replicas":3,"updatedReplicas":3}} +{"apiVersion":"v1","data":{"k1":"v1"},"kind":"ConfigMap","metadata":{"creationTimestamp":"2022-01-01T00:00:02Z","labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest","l1":"v1"},"name":"foo","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"3","uid":"00000000-0000-0000-0000-000000000003"}} --- -GET http://kube-apiserver/apis/apps/v1/namespaces/ns1/deployments/mydeployment +PATCH http://kube-apiserver/apis/apps/v1/namespaces/ns1/deployments/mydeployment?fieldManager=kubectl-client-side-apply&fieldValidation=Strict&force=true Accept: application/json +Content-Type: application/apply-patch+yaml + +{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}]},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}}} + 200 OK Cache-Control: no-cache, private -Content-Length: 1680 +Content-Length: 666 Content-Type: application/json Date: (removed) -{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"apps/v1\",\"kind\":\"Deployment\",\"metadata\":{\"annotations\":{},\"labels\":{\"addons.example.org/simpletest\":\"simple1\",\"example-app\":\"simpletest\"},\"name\":\"mydeployment\",\"namespace\":\"ns1\",\"ownerReferences\":[{\"apiVersion\":\"addons.example.org/v1alpha1\",\"blockOwnerDeletion\":true,\"controller\":true,\"kind\":\"SimpleTest\",\"name\":\"simple1\",\"uid\":\"00000000-0000-0000-0000-000000000002\"}]},\"spec\":{\"replicas\":3,\"selector\":{\"matchLabels\":{\"app\":\"bar\"}},\"template\":{\"metadata\":{\"labels\":{\"app\":\"bar\"}},\"spec\":{\"containers\":[{\"image\":\"registry.k8s.io/pause:3.9\",\"name\":\"main\"}]}}}}\n"},"creationTimestamp":"2022-01-01T00:00:03Z","generation":1,"labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"4","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}},"status":{"availableReplicas":3,"conditions":[{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"MinimumReplicasAvailable","status":"True","type":"Available"},{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"NewReplicaSetAvailable","status":"True","type":"Progressing"}],"observedGeneration":1,"readyReplicas":3,"replicas":3,"updatedReplicas":3}} +{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"creationTimestamp":"2022-01-01T00:00:03Z","labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"4","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}}} --- -PUT http://kube-apiserver/apis/addons.example.org/v1alpha1/namespaces/ns1/simpletests/simple1/status -Accept: application/json, */* -Content-Type: application/json - -{"kind":"SimpleTest","apiVersion":"addons.example.org/v1alpha1","metadata":{"name":"simple1","namespace":"ns1","uid":"00000000-0000-0000-0000-000000000002","resourceVersion":"5","generation":1,"creationTimestamp":"2022-01-01T00:00:01Z"},"spec":{"channel":"stable"},"status":{"healthy":true}} - +GET http://kube-apiserver/apis/apps/v1/namespaces/ns1/deployments/mydeployment +Accept: application/json 200 OK Cache-Control: no-cache, private -Content-Length: 291 +Content-Length: 666 Content-Type: application/json Date: (removed) -{"apiVersion":"addons.example.org/v1alpha1","kind":"SimpleTest","metadata":{"creationTimestamp":"2022-01-01T00:00:01Z","generation":1,"name":"simple1","namespace":"ns1","resourceVersion":"5","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"channel":"stable"},"status":{"healthy":true}} +{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"creationTimestamp":"2022-01-01T00:00:03Z","labels":{"addons.example.org/simpletest":"simple1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"4","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}}} diff --git a/pkg/test/testreconciler/simpletest/testdata/reconcile/ssa/create/expected-http.yaml b/pkg/test/testreconciler/simpletest/testdata/reconcile/ssa/create/expected-http.yaml index 7347d59f..e69c4477 100644 --- a/pkg/test/testreconciler/simpletest/testdata/reconcile/ssa/create/expected-http.yaml +++ b/pkg/test/testreconciler/simpletest/testdata/reconcile/ssa/create/expected-http.yaml @@ -16,15 +16,15 @@ Accept: application/json, */* 200 OK Cache-Control: no-cache, private -Content-Length: 379 +Content-Length: 364 Content-Type: application/json Date: (removed) -{"apiVersion":"addons.example.org/v1alpha1","items":[{"apiVersion":"addons.example.org/v1alpha1","kind":"SimpleTest","metadata":{"creationTimestamp":"2022-01-01T00:00:01Z","generation":1,"name":"simple1","namespace":"ns1","resourceVersion":"2","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"channel":"stable"}}],"kind":"SimpleTestList","metadata":{"resourceVersion":"2"}} +{"apiVersion":"addons.example.org/v1alpha1","items":[{"apiVersion":"addons.example.org/v1alpha1","kind":"SimpleTest","metadata":{"creationTimestamp":"2022-01-01T00:00:01Z","name":"simple1","namespace":"ns1","resourceVersion":"2","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"channel":"stable"}}],"kind":"SimpleTestList","metadata":{"resourceVersion":"3"}} --- -GET http://kube-apiserver/apis/addons.example.org/v1alpha1/simpletests?allowWatchBookmarks=true&resourceVersion=2&timeoutSeconds=&watch=true +GET http://kube-apiserver/apis/addons.example.org/v1alpha1/simpletests?allowWatchBookmarks=true&resourceVersion=3&timeoutSeconds=&watch=true Accept: application/json, */* 200 OK @@ -118,16 +118,16 @@ PUT http://kube-apiserver/apis/addons.example.org/v1alpha1/namespaces/ns1/simple Accept: application/json, */* Content-Type: application/json -{"kind":"SimpleTest","apiVersion":"addons.example.org/v1alpha1","metadata":{"name":"simple1","namespace":"ns1","uid":"00000000-0000-0000-0000-000000000002","resourceVersion":"2","generation":1,"creationTimestamp":"2022-01-01T00:00:01Z","labels":{"applyset.kubernetes.io/id":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1"},"annotations":{"applyset.kubernetes.io/additional-namespaces":"","applyset.kubernetes.io/contains-group-kinds":"ConfigMap,Deployment.apps","applyset.kubernetes.io/tooling":"SimpleTest/"}},"spec":{"channel":"stable"},"status":{"healthy":false}} +{"kind":"SimpleTest","apiVersion":"addons.example.org/v1alpha1","metadata":{"name":"simple1","namespace":"ns1","uid":"00000000-0000-0000-0000-000000000002","resourceVersion":"2","creationTimestamp":"2022-01-01T00:00:01Z","labels":{"applyset.kubernetes.io/id":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1"},"annotations":{"applyset.kubernetes.io/additional-namespaces":"","applyset.kubernetes.io/contains-group-resources":"configmaps,deployments.apps","applyset.kubernetes.io/tooling":"SimpleTest/"}},"spec":{"channel":"stable"},"status":{"healthy":false}} 200 OK Cache-Control: no-cache, private -Content-Length: 576 +Content-Length: 567 Content-Type: application/json Date: (removed) -{"apiVersion":"addons.example.org/v1alpha1","kind":"SimpleTest","metadata":{"annotations":{"applyset.kubernetes.io/additional-namespaces":"","applyset.kubernetes.io/contains-group-kinds":"ConfigMap,Deployment.apps","applyset.kubernetes.io/tooling":"SimpleTest/"},"creationTimestamp":"2022-01-01T00:00:01Z","generation":1,"labels":{"applyset.kubernetes.io/id":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1"},"name":"simple1","namespace":"ns1","resourceVersion":"3","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"channel":"stable"},"status":{"healthy":false}} +{"apiVersion":"addons.example.org/v1alpha1","kind":"SimpleTest","metadata":{"annotations":{"applyset.kubernetes.io/additional-namespaces":"","applyset.kubernetes.io/contains-group-resources":"configmaps,deployments.apps","applyset.kubernetes.io/tooling":"SimpleTest/"},"creationTimestamp":"2022-01-01T00:00:01Z","labels":{"applyset.kubernetes.io/id":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1"},"name":"simple1","namespace":"ns1","resourceVersion":"3","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"channel":"stable"},"status":{"healthy":false}} --- @@ -155,11 +155,11 @@ Content-Type: application/apply-patch+yaml 200 OK Cache-Control: no-cache, private -Content-Length: 1040 +Content-Length: 757 Content-Type: application/json Date: (removed) -{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"creationTimestamp":"2022-01-01T00:00:03Z","generation":1,"labels":{"addons.example.org/simpletest":"simple1","applyset.kubernetes.io/part-of":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"5","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}},"status":{"availableReplicas":3,"conditions":[{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"MinimumReplicasAvailable","status":"True","type":"Available"},{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"NewReplicaSetAvailable","status":"True","type":"Progressing"}],"observedGeneration":1,"readyReplicas":3,"replicas":3,"updatedReplicas":3}} +{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"creationTimestamp":"2022-01-01T00:00:03Z","labels":{"addons.example.org/simpletest":"simple1","applyset.kubernetes.io/part-of":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"5","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}}} --- @@ -181,11 +181,11 @@ Accept: application/json 200 OK Cache-Control: no-cache, private -Content-Length: 1040 +Content-Length: 757 Content-Type: application/json Date: (removed) -{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"creationTimestamp":"2022-01-01T00:00:03Z","generation":1,"labels":{"addons.example.org/simpletest":"simple1","applyset.kubernetes.io/part-of":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"5","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}},"status":{"availableReplicas":3,"conditions":[{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"MinimumReplicasAvailable","status":"True","type":"Available"},{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"NewReplicaSetAvailable","status":"True","type":"Progressing"}],"observedGeneration":1,"readyReplicas":3,"replicas":3,"updatedReplicas":3}} +{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"creationTimestamp":"2022-01-01T00:00:03Z","labels":{"addons.example.org/simpletest":"simple1","applyset.kubernetes.io/part-of":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"5","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}}} --- @@ -193,15 +193,15 @@ PUT http://kube-apiserver/apis/addons.example.org/v1alpha1/namespaces/ns1/simple Accept: application/json, */* Content-Type: application/json -{"apiVersion":"addons.example.org/v1alpha1","kind":"SimpleTest","metadata":{"annotations":{"applyset.kubernetes.io/additional-namespaces":"","applyset.kubernetes.io/contains-group-kinds":"ConfigMap,Deployment.apps","applyset.kubernetes.io/tooling":"SimpleTest/"},"creationTimestamp":"2022-01-01T00:00:01Z","generation":1,"labels":{"applyset.kubernetes.io/id":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1"},"name":"simple1","namespace":"ns1","resourceVersion":"3","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"channel":"stable"},"status":{"conditions":[{"lastTransitionTime":"2022-01-01T00:00:00Z","message":"all manifests are reconciled.","reason":"Normal","status":"True","type":"Ready"}],"healthy":true,"phase":"Current"}} +{"apiVersion":"addons.example.org/v1alpha1","kind":"SimpleTest","metadata":{"annotations":{"applyset.kubernetes.io/additional-namespaces":"","applyset.kubernetes.io/contains-group-resources":"configmaps,deployments.apps","applyset.kubernetes.io/tooling":"SimpleTest/"},"creationTimestamp":"2022-01-01T00:00:01Z","labels":{"applyset.kubernetes.io/id":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1"},"name":"simple1","namespace":"ns1","resourceVersion":"3","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"channel":"stable"},"status":{"conditions":[{"lastTransitionTime":"2022-01-01T00:00:00Z","message":"apps/v1, Kind=Deployment/ns1/mydeployment:Replicas: 0/3","reason":"ManifestsNotReady","status":"False","type":"Ready"}],"healthy":false,"phase":"InProgress"}} 200 OK Cache-Control: no-cache, private -Content-Length: 745 +Content-Length: 778 Content-Type: application/json Date: (removed) -{"apiVersion":"addons.example.org/v1alpha1","kind":"SimpleTest","metadata":{"annotations":{"applyset.kubernetes.io/additional-namespaces":"","applyset.kubernetes.io/contains-group-kinds":"ConfigMap,Deployment.apps","applyset.kubernetes.io/tooling":"SimpleTest/"},"creationTimestamp":"2022-01-01T00:00:01Z","generation":1,"labels":{"applyset.kubernetes.io/id":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1"},"name":"simple1","namespace":"ns1","resourceVersion":"6","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"channel":"stable"},"status":{"conditions":[{"lastTransitionTime":"2022-01-01T00:00:00Z","message":"all manifests are reconciled.","reason":"Normal","status":"True","type":"Ready"}],"healthy":true,"phase":"Current"}} +{"apiVersion":"addons.example.org/v1alpha1","kind":"SimpleTest","metadata":{"annotations":{"applyset.kubernetes.io/additional-namespaces":"","applyset.kubernetes.io/contains-group-resources":"configmaps,deployments.apps","applyset.kubernetes.io/tooling":"SimpleTest/"},"creationTimestamp":"2022-01-01T00:00:01Z","labels":{"applyset.kubernetes.io/id":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1"},"name":"simple1","namespace":"ns1","resourceVersion":"6","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"channel":"stable"},"status":{"conditions":[{"lastTransitionTime":"2022-01-01T00:00:00Z","message":"apps/v1, Kind=Deployment/ns1/mydeployment:Replicas: 0/3","reason":"ManifestsNotReady","status":"False","type":"Ready"}],"healthy":false,"phase":"InProgress"}} --- @@ -223,11 +223,11 @@ Accept: application/json 200 OK Cache-Control: no-cache, private -Content-Length: 1040 +Content-Length: 757 Content-Type: application/json Date: (removed) -{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"creationTimestamp":"2022-01-01T00:00:03Z","generation":1,"labels":{"addons.example.org/simpletest":"simple1","applyset.kubernetes.io/part-of":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"5","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}},"status":{"availableReplicas":3,"conditions":[{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"MinimumReplicasAvailable","status":"True","type":"Available"},{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"NewReplicaSetAvailable","status":"True","type":"Progressing"}],"observedGeneration":1,"readyReplicas":3,"replicas":3,"updatedReplicas":3}} +{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"creationTimestamp":"2022-01-01T00:00:03Z","labels":{"addons.example.org/simpletest":"simple1","applyset.kubernetes.io/part-of":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"5","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}}} --- @@ -249,11 +249,27 @@ Accept: application/json;g=apidiscovery.k8s.io;v=v2beta1;as=APIGroupDiscoveryLis 200 OK Cache-Control: no-cache, private -Content-Length: 3401 +Content-Length: 3521 Content-Type: application/json Date: (removed) -{"kind":"APIGroupList","apiVersion":"v1","groups":[{"name":"addons.example.org","versions":[{"groupVersion":"addons.example.org/v1alpha1","version":"v1alpha1"}],"preferredVersion":{"groupVersion":"addons.example.org/v1alpha1","version":"v1alpha1"}},{"name":"admissionregistration.k8s.io","versions":[{"groupVersion":"admissionregistration.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"admissionregistration.k8s.io/v1","version":"v1"}},{"name":"apiextensions.k8s.io","versions":[{"groupVersion":"apiextensions.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"apiextensions.k8s.io/v1","version":"v1"}},{"name":"apiregistration.k8s.io","versions":[{"groupVersion":"apiregistration.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"apiregistration.k8s.io/v1","version":"v1"}},{"name":"apps","versions":[{"groupVersion":"apps/v1","version":"v1"}],"preferredVersion":{"groupVersion":"apps/v1","version":"v1"}},{"name":"autoscaling","versions":[{"groupVersion":"autoscaling/v1","version":"v1"},{"groupVersion":"autoscaling/v2","version":"v2"},{"groupVersion":"autoscaling/v2beta2","version":"v2beta2"}],"preferredVersion":{"groupVersion":"autoscaling/v2beta2","version":"v2beta2"}},{"name":"batch","versions":[{"groupVersion":"batch/v1","version":"v1"}],"preferredVersion":{"groupVersion":"batch/v1","version":"v1"}},{"name":"certificates.k8s.io","versions":[{"groupVersion":"certificates.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"certificates.k8s.io/v1","version":"v1"}},{"name":"coordination.k8s.io","versions":[{"groupVersion":"coordination.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"coordination.k8s.io/v1","version":"v1"}},{"name":"discovery.k8s.io","versions":[{"groupVersion":"discovery.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"discovery.k8s.io/v1","version":"v1"}},{"name":"events.k8s.io","versions":[{"groupVersion":"events.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"events.k8s.io/v1","version":"v1"}},{"name":"flowcontrol.apiserver.k8s.io","versions":[{"groupVersion":"flowcontrol.apiserver.k8s.io/v1beta1","version":"v1beta1"},{"groupVersion":"flowcontrol.apiserver.k8s.io/v1beta2","version":"v1beta2"}],"preferredVersion":{"groupVersion":"flowcontrol.apiserver.k8s.io/v1beta2","version":"v1beta2"}},{"name":"networking.k8s.io","versions":[{"groupVersion":"networking.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"networking.k8s.io/v1","version":"v1"}},{"name":"node.k8s.io","versions":[{"groupVersion":"node.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"node.k8s.io/v1","version":"v1"}},{"name":"policy","versions":[{"groupVersion":"policy/v1","version":"v1"}],"preferredVersion":{"groupVersion":"policy/v1","version":"v1"}},{"name":"rbac.authorization.k8s.io","versions":[{"groupVersion":"rbac.authorization.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"rbac.authorization.k8s.io/v1","version":"v1"}},{"name":"scheduling.k8s.io","versions":[{"groupVersion":"scheduling.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"scheduling.k8s.io/v1","version":"v1"}},{"name":"storage.k8s.io","versions":[{"groupVersion":"storage.k8s.io/v1","version":"v1"},{"groupVersion":"storage.k8s.io/v1beta1","version":"v1beta1"}],"preferredVersion":{"groupVersion":"storage.k8s.io/v1beta1","version":"v1beta1"}}]} +{"kind":"APIGroupList","apiVersion":"v1","groups":[{"name":"","versions":[{"groupVersion":"/v1","version":"v1"}],"preferredVersion":{"groupVersion":"/v1","version":"v1"}},{"name":"addons.example.org","versions":[{"groupVersion":"addons.example.org/v1alpha1","version":"v1alpha1"}],"preferredVersion":{"groupVersion":"addons.example.org/v1alpha1","version":"v1alpha1"}},{"name":"admissionregistration.k8s.io","versions":[{"groupVersion":"admissionregistration.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"admissionregistration.k8s.io/v1","version":"v1"}},{"name":"apiextensions.k8s.io","versions":[{"groupVersion":"apiextensions.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"apiextensions.k8s.io/v1","version":"v1"}},{"name":"apiregistration.k8s.io","versions":[{"groupVersion":"apiregistration.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"apiregistration.k8s.io/v1","version":"v1"}},{"name":"apps","versions":[{"groupVersion":"apps/v1","version":"v1"}],"preferredVersion":{"groupVersion":"apps/v1","version":"v1"}},{"name":"autoscaling","versions":[{"groupVersion":"autoscaling/v1","version":"v1"},{"groupVersion":"autoscaling/v2","version":"v2"},{"groupVersion":"autoscaling/v2beta2","version":"v2beta2"}],"preferredVersion":{"groupVersion":"autoscaling/v2beta2","version":"v2beta2"}},{"name":"batch","versions":[{"groupVersion":"batch/v1","version":"v1"}],"preferredVersion":{"groupVersion":"batch/v1","version":"v1"}},{"name":"certificates.k8s.io","versions":[{"groupVersion":"certificates.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"certificates.k8s.io/v1","version":"v1"}},{"name":"coordination.k8s.io","versions":[{"groupVersion":"coordination.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"coordination.k8s.io/v1","version":"v1"}},{"name":"discovery.k8s.io","versions":[{"groupVersion":"discovery.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"discovery.k8s.io/v1","version":"v1"}},{"name":"events.k8s.io","versions":[{"groupVersion":"events.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"events.k8s.io/v1","version":"v1"}},{"name":"flowcontrol.apiserver.k8s.io","versions":[{"groupVersion":"flowcontrol.apiserver.k8s.io/v1beta1","version":"v1beta1"},{"groupVersion":"flowcontrol.apiserver.k8s.io/v1beta2","version":"v1beta2"}],"preferredVersion":{"groupVersion":"flowcontrol.apiserver.k8s.io/v1beta2","version":"v1beta2"}},{"name":"networking.k8s.io","versions":[{"groupVersion":"networking.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"networking.k8s.io/v1","version":"v1"}},{"name":"node.k8s.io","versions":[{"groupVersion":"node.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"node.k8s.io/v1","version":"v1"}},{"name":"policy","versions":[{"groupVersion":"policy/v1","version":"v1"}],"preferredVersion":{"groupVersion":"policy/v1","version":"v1"}},{"name":"rbac.authorization.k8s.io","versions":[{"groupVersion":"rbac.authorization.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"rbac.authorization.k8s.io/v1","version":"v1"}},{"name":"scheduling.k8s.io","versions":[{"groupVersion":"scheduling.k8s.io/v1","version":"v1"}],"preferredVersion":{"groupVersion":"scheduling.k8s.io/v1","version":"v1"}},{"name":"storage.k8s.io","versions":[{"groupVersion":"storage.k8s.io/v1","version":"v1"},{"groupVersion":"storage.k8s.io/v1beta1","version":"v1beta1"}],"preferredVersion":{"groupVersion":"storage.k8s.io/v1beta1","version":"v1beta1"}}]} + +--- + +PUT http://kube-apiserver/apis/addons.example.org/v1alpha1/namespaces/ns1/simpletests/simple1 +Accept: application/json, */* +Content-Type: application/json + +{"apiVersion":"addons.example.org/v1alpha1","kind":"SimpleTest","metadata":{"annotations":{"applyset.kubernetes.io/additional-namespaces":"","applyset.kubernetes.io/contains-group-resources":"configmaps,deployments.apps","applyset.kubernetes.io/tooling":"SimpleTest/"},"creationTimestamp":"2022-01-01T00:00:01Z","labels":{"applyset.kubernetes.io/id":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1"},"name":"simple1","namespace":"ns1","resourceVersion":"6","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"channel":"stable"},"status":{"conditions":[{"lastTransitionTime":"2022-01-01T00:00:00Z","message":"apps/v1, Kind=Deployment/ns1/mydeployment:Replicas: 0/3","reason":"ManifestsNotReady","status":"False","type":"Ready"}],"healthy":false,"phase":"InProgress"}} + +200 OK +Cache-Control: no-cache, private +Content-Length: 778 +Content-Type: application/json +Date: (removed) + +{"apiVersion":"addons.example.org/v1alpha1","kind":"SimpleTest","metadata":{"annotations":{"applyset.kubernetes.io/additional-namespaces":"","applyset.kubernetes.io/contains-group-resources":"configmaps,deployments.apps","applyset.kubernetes.io/tooling":"SimpleTest/"},"creationTimestamp":"2022-01-01T00:00:01Z","labels":{"applyset.kubernetes.io/id":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1"},"name":"simple1","namespace":"ns1","resourceVersion":"6","uid":"00000000-0000-0000-0000-000000000002"},"spec":{"channel":"stable"},"status":{"conditions":[{"lastTransitionTime":"2022-01-01T00:00:00Z","message":"apps/v1, Kind=Deployment/ns1/mydeployment:Replicas: 0/3","reason":"ManifestsNotReady","status":"False","type":"Ready"}],"healthy":false,"phase":"InProgress"}} --- @@ -281,11 +297,11 @@ Content-Type: application/apply-patch+yaml 200 OK Cache-Control: no-cache, private -Content-Length: 1040 +Content-Length: 757 Content-Type: application/json Date: (removed) -{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"creationTimestamp":"2022-01-01T00:00:03Z","generation":1,"labels":{"addons.example.org/simpletest":"simple1","applyset.kubernetes.io/part-of":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"5","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}},"status":{"availableReplicas":3,"conditions":[{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"MinimumReplicasAvailable","status":"True","type":"Available"},{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"NewReplicaSetAvailable","status":"True","type":"Progressing"}],"observedGeneration":1,"readyReplicas":3,"replicas":3,"updatedReplicas":3}} +{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"creationTimestamp":"2022-01-01T00:00:03Z","labels":{"addons.example.org/simpletest":"simple1","applyset.kubernetes.io/part-of":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"5","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}}} --- @@ -307,8 +323,8 @@ Accept: application/json 200 OK Cache-Control: no-cache, private -Content-Length: 1040 +Content-Length: 757 Content-Type: application/json Date: (removed) -{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"creationTimestamp":"2022-01-01T00:00:03Z","generation":1,"labels":{"addons.example.org/simpletest":"simple1","applyset.kubernetes.io/part-of":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"5","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}},"status":{"availableReplicas":3,"conditions":[{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"MinimumReplicasAvailable","status":"True","type":"Available"},{"lastTransitionTime":"2022-01-01T00:00:00Z","reason":"NewReplicaSetAvailable","status":"True","type":"Progressing"}],"observedGeneration":1,"readyReplicas":3,"replicas":3,"updatedReplicas":3}} +{"apiVersion":"apps/v1","kind":"Deployment","metadata":{"creationTimestamp":"2022-01-01T00:00:03Z","labels":{"addons.example.org/simpletest":"simple1","applyset.kubernetes.io/part-of":"applyset-xbxAWnAItX3p1Gxrs86F-ZQAGwGoys9xxQGK3IED7bY-v1","example-app":"simpletest"},"name":"mydeployment","namespace":"ns1","ownerReferences":[{"apiVersion":"addons.example.org/v1alpha1","blockOwnerDeletion":true,"controller":true,"kind":"SimpleTest","name":"simple1","uid":"00000000-0000-0000-0000-000000000002"}],"resourceVersion":"5","uid":"00000000-0000-0000-0000-000000000004"},"spec":{"replicas":3,"selector":{"matchLabels":{"app":"bar"}},"template":{"metadata":{"labels":{"app":"bar"}},"spec":{"containers":[{"image":"registry.k8s.io/pause:3.9","name":"main"}]}}}}