From c317b3766f64e741f97d44d47f9c0fa363a7c5f5 Mon Sep 17 00:00:00 2001 From: justinsb Date: Sun, 24 Sep 2023 12:11:42 -0400 Subject: [PATCH] mockkubeapiserver: Refactor storage to be pluggable This helps if we want e.g. to capture all the objects easily. --- mockkubeapiserver/apiserver.go | 38 +- mockkubeapiserver/controllers.go | 213 - mockkubeapiserver/deleteresource.go | 2 +- mockkubeapiserver/getresource.go | 2 +- mockkubeapiserver/hooks/crd.go | 38 + mockkubeapiserver/hooks/deployment.go | 98 + mockkubeapiserver/hooks/namespace.go | 64 + mockkubeapiserver/listresource.go | 32 +- mockkubeapiserver/memorystorage_watch.go | 185 - mockkubeapiserver/patchresource.go | 11 +- mockkubeapiserver/postresource.go | 2 +- mockkubeapiserver/putresource.go | 4 +- mockkubeapiserver/{ => schemas}/Makefile | 0 .../kubernetes_builtin_schema.go | 2 +- .../kubernetes_builtin_schema.meta.yaml | 0 .../kubernetes_builtin_schema.yaml | 5299 +++++++++-------- mockkubeapiserver/{ => storage}/clock.go | 3 +- mockkubeapiserver/storage/hook.go | 6 + mockkubeapiserver/storage/interface.go | 33 + .../storage/memorystorage/crd.go | 101 + .../memorystorage}/memorystorage.go | 143 +- .../memorystorage/memorystorage_watch.go | 104 + .../storage/memorystorage/resourceinfo.go | 35 + .../storage/memorystorage/schema.go | 19 + .../memorystorage}/schema_test.go | 9 +- .../{schema.go => storage/resourceinfo.go} | 51 +- mockkubeapiserver/{ => storage}/uid.go | 2 +- mockkubeapiserver/storage/watchevent.go | 116 + .../tools/generate-typeinfo/main.go | 8 +- pkg/test/httprecorder/request_log.go | 7 +- 30 files changed, 3581 insertions(+), 3046 deletions(-) delete mode 100644 mockkubeapiserver/controllers.go create mode 100644 mockkubeapiserver/hooks/crd.go create mode 100644 mockkubeapiserver/hooks/deployment.go create mode 100644 mockkubeapiserver/hooks/namespace.go delete mode 100644 mockkubeapiserver/memorystorage_watch.go rename mockkubeapiserver/{ => schemas}/Makefile (100%) rename mockkubeapiserver/{ => schemas}/kubernetes_builtin_schema.go (98%) rename mockkubeapiserver/{ => schemas}/kubernetes_builtin_schema.meta.yaml (100%) rename mockkubeapiserver/{ => schemas}/kubernetes_builtin_schema.yaml (93%) rename mockkubeapiserver/{ => storage}/clock.go (95%) create mode 100644 mockkubeapiserver/storage/hook.go create mode 100644 mockkubeapiserver/storage/interface.go create mode 100644 mockkubeapiserver/storage/memorystorage/crd.go rename mockkubeapiserver/{ => storage/memorystorage}/memorystorage.go (63%) create mode 100644 mockkubeapiserver/storage/memorystorage/memorystorage_watch.go create mode 100644 mockkubeapiserver/storage/memorystorage/resourceinfo.go create mode 100644 mockkubeapiserver/storage/memorystorage/schema.go rename mockkubeapiserver/{ => storage/memorystorage}/schema_test.go (83%) rename mockkubeapiserver/{schema.go => storage/resourceinfo.go} (53%) rename mockkubeapiserver/{ => storage}/uid.go (96%) create mode 100644 mockkubeapiserver/storage/watchevent.go diff --git a/mockkubeapiserver/apiserver.go b/mockkubeapiserver/apiserver.go index ef121f07..78f96bd9 100644 --- a/mockkubeapiserver/apiserver.go +++ b/mockkubeapiserver/apiserver.go @@ -22,9 +22,12 @@ import ( "strings" "k8s.io/klog/v2" + "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver/hooks" + "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver/storage" + "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver/storage/memorystorage" ) -func NewMockKubeAPIServer(addr string) (*MockKubeAPIServer, error) { +func NewMockKubeAPIServer(addr string, options ...Option) (*MockKubeAPIServer, error) { s := &MockKubeAPIServer{} if addr == "" { addr = ":http" @@ -32,13 +35,26 @@ func NewMockKubeAPIServer(addr string) (*MockKubeAPIServer, error) { s.httpServer = &http.Server{Addr: addr, Handler: s} - var err error + for _, option := range options { + if err := option(s); err != nil { + return nil, err + } + } - s.storage, err = NewMemoryStorage(NewTestClock(), NewTestUIDGenerator()) - if err != nil { - return nil, err + // If storage wasn't set with an option, default to memory storage + if s.storage == nil { + storage, err := memorystorage.NewMemoryStorage(storage.NewTestClock(), storage.NewTestUIDGenerator()) + if err != nil { + return nil, err + } + s.storage = storage } + // These hooks mock behaviour that would otherwise require full controllers + s.storage.AddStorageHook(&hooks.CRDHook{}) + s.storage.AddStorageHook(&hooks.NamespaceHook{}) + s.storage.AddStorageHook(&hooks.DeploymentHook{}) + return s, nil } @@ -46,7 +62,7 @@ type MockKubeAPIServer struct { httpServer *http.Server listener net.Listener - storage *MemoryStorage + storage storage.Storage hooks []Hook } @@ -337,3 +353,13 @@ func (s *MockKubeAPIServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError) } } + +type Option func(config *MockKubeAPIServer) error + +// WithStorage is an Option that allows specifying the storage implementation. +func WithStorage(storage storage.Storage) Option { + return func(config *MockKubeAPIServer) error { + config.storage = storage + return nil + } +} diff --git a/mockkubeapiserver/controllers.go b/mockkubeapiserver/controllers.go deleted file mode 100644 index 7f9065cd..00000000 --- a/mockkubeapiserver/controllers.go +++ /dev/null @@ -1,213 +0,0 @@ -/* -Copyright 2022 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package mockkubeapiserver - -import ( - "fmt" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/klog/v2" -) - -func (s *MemoryStorage) objectChanged(u *unstructured.Unstructured) { - gvk := u.GroupVersionKind() - - switch gvk.GroupKind() { - case schema.GroupKind{Kind: "Namespace"}: - s.namespaceChanged(u) - case schema.GroupKind{Group: "apps", Kind: "Deployment"}: - if err := s.deploymentChanged(u); err != nil { - klog.Fatalf("could not update deployment status: %v", err) - } - case schema.GroupKind{Group: "apiextensions.k8s.io", Kind: "CustomResourceDefinition"}: - if err := s.crdChanged(u); err != nil { - klog.Warningf("crd change was invalid: %v", err) - } - } -} - -func (s *MemoryStorage) namespaceChanged(u *unstructured.Unstructured) { - // These changes seem to be done synchronously (similar to a mutating webhook) - labels := u.GetLabels() - name := u.GetName() - if labels["kubernetes.io/metadata.name"] != name { - if labels == nil { - labels = make(map[string]string) - } - labels["kubernetes.io/metadata.name"] = name - u.SetLabels(labels) - } - phase, _, _ := unstructured.NestedFieldNoCopy(u.Object, "status", "phase") - if phase != "Active" { - unstructured.SetNestedField(u.Object, "Active", "status", "phase") - } - found := false - finalizers, _, _ := unstructured.NestedSlice(u.Object, "spec", "finalizers") - for _, finalizer := range finalizers { - if finalizer == "kubernetes" { - found = true - } - } - if !found { - finalizers = append(finalizers, "kubernetes") - unstructured.SetNestedSlice(u.Object, finalizers, "spec", "finalizers") - } -} - -func (s *MemoryStorage) crdChanged(u *unstructured.Unstructured) error { - // TODO: Deleted / changed CRDs - - group, _, _ := unstructured.NestedString(u.Object, "spec", "group") - if group == "" { - return fmt.Errorf("spec.group not set") - } - - kind, _, _ := unstructured.NestedString(u.Object, "spec", "names", "kind") - if kind == "" { - return fmt.Errorf("spec.names.kind not set") - } - - resource, _, _ := unstructured.NestedString(u.Object, "spec", "names", "plural") - if resource == "" { - return fmt.Errorf("spec.names.plural not set") - } - - scope, _, _ := unstructured.NestedString(u.Object, "spec", "scope") - if scope == "" { - return fmt.Errorf("spec.scope not set") - } - - versionsObj, found, _ := unstructured.NestedFieldNoCopy(u.Object, "spec", "versions") - if !found { - return fmt.Errorf("spec.versions not set") - } - - versions, ok := versionsObj.([]interface{}) - if !ok { - return fmt.Errorf("spec.versions not a slice") - } - - for _, versionObj := range versions { - version, ok := versionObj.(map[string]interface{}) - if !ok { - return fmt.Errorf("spec.versions element not an object") - } - - versionName, _, _ := unstructured.NestedString(version, "name") - if versionName == "" { - return fmt.Errorf("version name not set") - } - gvk := schema.GroupVersionKind{Group: group, Version: versionName, Kind: kind} - gvr := gvk.GroupVersion().WithResource(resource) - gr := gvr.GroupResource() - - storage := &resourceStorage{ - GroupResource: gr, - objects: make(map[types.NamespacedName]*unstructured.Unstructured), - } - - // TODO: share storage across different versions - s.resourceStorages[gr] = storage - - r := &ResourceInfo{ - API: metav1.APIResource{ - Name: resource, - Group: gvk.Group, - Version: gvk.Version, - Kind: gvk.Kind, - }, - GVK: gvk, - GVR: gvr, - storage: storage, - } - r.ListGVK = gvk.GroupVersion().WithKind(gvk.Kind + "List") - - // TODO: Set r.TypeInfo from schema - - switch scope { - case "Namespaced": - r.API.Namespaced = true - case "Cluster": - r.API.Namespaced = false - default: - return fmt.Errorf("scope %q is not recognized", scope) - } - - s.schema.resources = append(s.schema.resources, r) - } - return nil -} - -func (s *MemoryStorage) deploymentChanged(u *unstructured.Unstructured) error { - // So that deployments become ready, we immediately update the status. - // We could do something better here, like e.g. a 1 second pause before changing the status - statusObj := u.Object["status"] - if statusObj == nil { - statusObj = make(map[string]interface{}) - u.Object["status"] = statusObj - } - status, ok := statusObj.(map[string]interface{}) - if !ok { - return fmt.Errorf("status was of unexpected type %T", statusObj) - } - - generation := u.GetGeneration() - if generation == 0 { - generation = 1 - u.SetGeneration(generation) - } - - replicasVal, _, err := unstructured.NestedFieldNoCopy(u.Object, "spec", "replicas") - if err != nil { - return fmt.Errorf("error getting spec.replicas: %w", err) - } - replicas := int64(0) - switch replicasVal := replicasVal.(type) { - case int64: - replicas = replicasVal - case float64: - replicas = int64(replicasVal) - default: - return fmt.Errorf("unhandled type for spec.replicas %T", replicasVal) - } - - var conditions []interface{} - conditions = append(conditions, map[string]interface{}{ - "type": "Available", - "status": "True", - "reason": "MinimumReplicasAvailable", - }) - conditions = append(conditions, map[string]interface{}{ - "type": "Progressing", - "status": "True", - "reason": "NewReplicaSetAvailable", - }) - status["conditions"] = conditions - - status["availableReplicas"] = replicas - status["readyReplicas"] = replicas - status["replicas"] = replicas - status["updatedReplicas"] = replicas - - observedGeneration := generation - status["observedGeneration"] = observedGeneration - - return nil -} diff --git a/mockkubeapiserver/deleteresource.go b/mockkubeapiserver/deleteresource.go index b0a12e2b..b1da4588 100644 --- a/mockkubeapiserver/deleteresource.go +++ b/mockkubeapiserver/deleteresource.go @@ -44,7 +44,7 @@ func (req *deleteResource) Run(ctx context.Context, s *MockKubeAPIServer) error return fmt.Errorf("unexpected subresource on delete %q", req.SubResource) } - deletedObject, err := s.storage.DeleteObject(ctx, resource, id) + deletedObject, err := resource.DeleteObject(ctx, id) if err != nil { return err } diff --git a/mockkubeapiserver/getresource.go b/mockkubeapiserver/getresource.go index 93545fb0..c6043c7a 100644 --- a/mockkubeapiserver/getresource.go +++ b/mockkubeapiserver/getresource.go @@ -52,7 +52,7 @@ func (req *getResource) Run(ctx context.Context, s *MockKubeAPIServer) error { id := types.NamespacedName{Namespace: req.Namespace, Name: req.Name} - object, found, err := s.storage.GetObject(ctx, resource, id) + object, found, err := resource.GetObject(ctx, id) if err != nil { return err } diff --git a/mockkubeapiserver/hooks/crd.go b/mockkubeapiserver/hooks/crd.go new file mode 100644 index 00000000..0bf48ea3 --- /dev/null +++ b/mockkubeapiserver/hooks/crd.go @@ -0,0 +1,38 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hooks + +import ( + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/klog/v2" + "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver/storage" +) + +// CRDHook implements functionality for CRD objects (the definitions themselves, not instances of CRDs) +type CRDHook struct { + storage storage.Storage +} + +func (s *CRDHook) OnWatchEvent(ev *storage.WatchEvent) { + switch ev.GroupKind() { + case schema.GroupKind{Group: "apiextensions.k8s.io", Kind: "CustomResourceDefinition"}: + // When a CRD is created, we notify the storage layer so it can store instances of the CRD + if err := s.storage.UpdateCRD(ev); err != nil { + klog.Warningf("crd change was invalid: %v", err) + } + } +} diff --git a/mockkubeapiserver/hooks/deployment.go b/mockkubeapiserver/hooks/deployment.go new file mode 100644 index 00000000..84e470e2 --- /dev/null +++ b/mockkubeapiserver/hooks/deployment.go @@ -0,0 +1,98 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hooks + +import ( + "fmt" + + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/klog/v2" + "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver/storage" +) + +type DeploymentHook struct { +} + +func (s *DeploymentHook) OnWatchEvent(ev *storage.WatchEvent) { + switch ev.GroupKind() { + case schema.GroupKind{Group: "apps", Kind: "Deployment"}: + if err := s.deploymentChanged(ev); err != nil { + klog.Fatalf("could not update deployment status: %v", err) + } + } +} + +// Fake the required transitions for Deployment objects so they become ready +func (s *DeploymentHook) deploymentChanged(ev *storage.WatchEvent) error { + u := ev.Unstructured() + + // So that deployments become ready, we immediately update the status. + // We could do something better here, like e.g. a 1 second pause before changing the status + statusObj := u.Object["status"] + if statusObj == nil { + statusObj = make(map[string]interface{}) + u.Object["status"] = statusObj + } + status, ok := statusObj.(map[string]interface{}) + if !ok { + return fmt.Errorf("status was of unexpected type %T", statusObj) + } + + generation := u.GetGeneration() + if generation == 0 { + generation = 1 + u.SetGeneration(generation) + } + + replicasVal, _, err := unstructured.NestedFieldNoCopy(u.Object, "spec", "replicas") + if err != nil { + return fmt.Errorf("error getting spec.replicas: %w", err) + } + replicas := int64(0) + switch replicasVal := replicasVal.(type) { + case int64: + replicas = replicasVal + case float64: + replicas = int64(replicasVal) + default: + return fmt.Errorf("unhandled type for spec.replicas %T", replicasVal) + } + + var conditions []interface{} + conditions = append(conditions, map[string]interface{}{ + "type": "Available", + "status": "True", + "reason": "MinimumReplicasAvailable", + }) + conditions = append(conditions, map[string]interface{}{ + "type": "Progressing", + "status": "True", + "reason": "NewReplicaSetAvailable", + }) + status["conditions"] = conditions + + status["availableReplicas"] = replicas + status["readyReplicas"] = replicas + status["replicas"] = replicas + status["updatedReplicas"] = replicas + + observedGeneration := generation + status["observedGeneration"] = observedGeneration + + return nil +} diff --git a/mockkubeapiserver/hooks/namespace.go b/mockkubeapiserver/hooks/namespace.go new file mode 100644 index 00000000..b6b3e7ca --- /dev/null +++ b/mockkubeapiserver/hooks/namespace.go @@ -0,0 +1,64 @@ +/* +Copyright 2022 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package hooks + +import ( + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver/storage" +) + +type NamespaceHook struct { +} + +func (s *NamespaceHook) OnWatchEvent(ev *storage.WatchEvent) { + switch ev.GroupKind() { + case schema.GroupKind{Kind: "Namespace"}: + s.namespaceChanged(ev) + } +} + +// Fake the required transitions for Namespace objects so they become ready +func (s *NamespaceHook) namespaceChanged(ev *storage.WatchEvent) { + u := ev.Unstructured() + + // These changes seem to be done synchronously (similar to a mutating webhook) + labels := u.GetLabels() + name := u.GetName() + if labels["kubernetes.io/metadata.name"] != name { + if labels == nil { + labels = make(map[string]string) + } + labels["kubernetes.io/metadata.name"] = name + u.SetLabels(labels) + } + phase, _, _ := unstructured.NestedFieldNoCopy(u.Object, "status", "phase") + if phase != "Active" { + unstructured.SetNestedField(u.Object, "Active", "status", "phase") + } + found := false + finalizers, _, _ := unstructured.NestedSlice(u.Object, "spec", "finalizers") + for _, finalizer := range finalizers { + if finalizer == "kubernetes" { + found = true + } + } + if !found { + finalizers = append(finalizers, "kubernetes") + unstructured.SetNestedSlice(u.Object, finalizers, "spec", "finalizers") + } +} diff --git a/mockkubeapiserver/listresource.go b/mockkubeapiserver/listresource.go index 319f1a87..daf23438 100644 --- a/mockkubeapiserver/listresource.go +++ b/mockkubeapiserver/listresource.go @@ -20,12 +20,10 @@ import ( "context" "net/http" "strings" - "sync" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/klog/v2" + "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver/storage" ) // listResource is a request to list resources @@ -61,35 +59,19 @@ func (req *listResource) Run(ctx context.Context, s *MockKubeAPIServer) error { return req.doWatch(ctx, s, resource, partialObjectMetadata) } - var filter ListFilter + var filter storage.ListFilter filter.Namespace = req.Namespace - objects, err := s.storage.ListObjects(ctx, resource, filter) + objects, err := resource.ListObjects(ctx, filter) if err != nil { return err } - objects.SetGroupVersionKind(resource.ListGVK) + objects.SetGroupVersionKind(resource.ListGVK()) return req.writeResponse(objects) } -type watchEvent struct { - internalObject *unstructured.Unstructured - eventType string - - Namespace string - - mutex sync.Mutex - partialObjectMetadataJSON []byte - json []byte -} - -type messageV1 struct { - Type string `json:"type"` - Object runtime.Object `json:"object"` -} - -func (req *listResource) doWatch(ctx context.Context, s *MockKubeAPIServer, resource *ResourceInfo, partialObjectMetadata bool) error { +func (req *listResource) doWatch(ctx context.Context, s *MockKubeAPIServer, resource storage.ResourceInfo, partialObjectMetadata bool) error { w := req.w contentType := "application/json" @@ -100,7 +82,7 @@ func (req *listResource) doWatch(ctx context.Context, s *MockKubeAPIServer, reso w.Header().Add("Content-Type", contentType) w.Header().Add("Cache-Control", "no-cache, private") - var opt WatchOptions + var opt storage.WatchOptions opt.Namespace = req.Namespace w.WriteHeader(200) @@ -108,7 +90,7 @@ func (req *listResource) doWatch(ctx context.Context, s *MockKubeAPIServer, reso f.Flush() } - return s.storage.Watch(ctx, resource, opt, func(ev *watchEvent) error { + return resource.Watch(ctx, opt, func(ev *storage.WatchEvent) error { klog.V(2).Infof("sending watch event %s", string(ev.JSON())) if partialObjectMetadata { if _, err := w.Write(ev.PartialObjectMetadataJSON()); err != nil { diff --git a/mockkubeapiserver/memorystorage_watch.go b/mockkubeapiserver/memorystorage_watch.go deleted file mode 100644 index 368b0f2c..00000000 --- a/mockkubeapiserver/memorystorage_watch.go +++ /dev/null @@ -1,185 +0,0 @@ -package mockkubeapiserver - -import ( - "context" - "encoding/json" - "sync" - - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "k8s.io/apimachinery/pkg/runtime/schema" - "k8s.io/apimachinery/pkg/types" - "k8s.io/klog/v2" -) - -type WatchCallback func(ev *watchEvent) error - -type WatchOptions struct { - Namespace string -} - -func (s *MemoryStorage) Watch(ctx context.Context, resource *ResourceInfo, opt WatchOptions, callback WatchCallback) error { - return resource.storage.watch(ctx, opt, callback) -} - -type resourceStorage struct { - GroupResource schema.GroupResource - - mutex sync.Mutex - watches []*watch - - objects map[types.NamespacedName]*unstructured.Unstructured -} - -type watch struct { - callback WatchCallback - opt WatchOptions - errChan chan error -} - -func (r *resourceStorage) watch(ctx context.Context, opt WatchOptions, callback WatchCallback) error { - w := &watch{ - callback: callback, - opt: opt, - errChan: make(chan error), - } - - r.mutex.Lock() - pos := -1 - for i := range r.watches { - if r.watches[i] == nil { - r.watches[i] = w - pos = i - break - } - } - if pos == -1 { - r.watches = append(r.watches, w) - pos = len(r.watches) - 1 - } - r.mutex.Unlock() - - // TODO: Delay / buffer watch notifications until after the list - - // TODO: Only send list if no rv specified? - - r.mutex.Lock() - for _, obj := range r.objects { - if opt.Namespace != "" { - if obj.GetNamespace() != opt.Namespace { - continue - } - } - - ev := buildWatchEvent("ADDED", obj) - if err := w.callback(ev); err != nil { - klog.Warningf("error sending backfill watch notification; stopping watch: %v", err) - - // remove watch from list - r.watches[pos] = nil - - return err - } - } - r.mutex.Unlock() - - return <-w.errChan -} - -func buildWatchEvent(evType string, u *unstructured.Unstructured) *watchEvent { - ev := &watchEvent{ - internalObject: u, - eventType: evType, - Namespace: u.GetNamespace(), - } - return ev -} - -func (ev *watchEvent) JSON() []byte { - ev.mutex.Lock() - defer ev.mutex.Unlock() - - if ev.json != nil { - return ev.json - } - u := ev.internalObject - - msg := messageV1{ - Type: ev.eventType, - Object: u, - } - - j, err := json.Marshal(&msg) - if err != nil { - klog.Fatalf("error from json.Marshal(%T): %v", &msg, err) - } - - j = append(j, byte('\n')) - ev.json = j - - return j -} - -// Constructs the message for a PartialObjectMetadata response -func (ev *watchEvent) PartialObjectMetadataJSON() []byte { - ev.mutex.Lock() - defer ev.mutex.Unlock() - - if ev.partialObjectMetadataJSON != nil { - return ev.partialObjectMetadataJSON - } - u := ev.internalObject - - partialObjectMetadata := &metav1.PartialObjectMetadata{} - partialObjectMetadata.APIVersion = u.GetAPIVersion() - partialObjectMetadata.Kind = u.GetKind() - - partialObjectMetadata.APIVersion = "meta.k8s.io/v1beta1" - partialObjectMetadata.Kind = "PartialObjectMetadata" - // {"kind":"PartialObjectMetadata","apiVersion":"meta.k8s.io/v1beta1","metadata"": - - partialObjectMetadata.Annotations = u.GetAnnotations() - partialObjectMetadata.Labels = u.GetLabels() - partialObjectMetadata.Name = u.GetName() - partialObjectMetadata.Namespace = u.GetNamespace() - partialObjectMetadata.ResourceVersion = u.GetResourceVersion() - partialObjectMetadata.Generation = u.GetGeneration() - partialObjectMetadata.CreationTimestamp = u.GetCreationTimestamp() - partialObjectMetadata.DeletionTimestamp = u.GetDeletionTimestamp() - partialObjectMetadata.DeletionGracePeriodSeconds = u.GetDeletionGracePeriodSeconds() - partialObjectMetadata.GenerateName = u.GetGenerateName() - - msg := messageV1{ - Type: ev.eventType, - Object: partialObjectMetadata, - } - - j, err := json.Marshal(&msg) - if err != nil { - klog.Fatalf("error from json.Marshal(%T): %v", &msg, err) - } - - j = append(j, byte('\n')) - ev.partialObjectMetadataJSON = j - return j -} - -func (r *resourceStorage) broadcastEventHoldingLock(ctx context.Context, evType string, u *unstructured.Unstructured) { - ev := buildWatchEvent(evType, u) - - // r.mutex should be locked - for i := range r.watches { - w := r.watches[i] - if w == nil { - continue - } - if w.opt.Namespace != "" && ev.Namespace != w.opt.Namespace { - continue - } - if err := w.callback(ev); err != nil { - klog.Warningf("error sending watch notification; stopping watch: %v", err) - w.errChan <- err - r.watches[i] = nil - } - } -} diff --git a/mockkubeapiserver/patchresource.go b/mockkubeapiserver/patchresource.go index e81b7662..94d05273 100644 --- a/mockkubeapiserver/patchresource.go +++ b/mockkubeapiserver/patchresource.go @@ -29,6 +29,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/klog/v2" + "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver/storage" ) // patchResource is a request to patch a single resource @@ -45,7 +46,7 @@ func (req *patchResource) Run(ctx context.Context, s *MockKubeAPIServer) error { } id := types.NamespacedName{Namespace: req.Namespace, Name: req.Name} - existingObj, found, err := s.storage.GetObject(ctx, resource, id) + existingObj, found, err := resource.GetObject(ctx, id) if err != nil { return err } @@ -78,7 +79,7 @@ func (req *patchResource) Run(ctx context.Context, s *MockKubeAPIServer) error { // TODO: Should we treat this like an apply to an empty object? patched := body - if err := s.storage.CreateObject(ctx, resource, id, patched); err != nil { + if err := resource.CreateObject(ctx, id, patched); err != nil { return err } @@ -88,7 +89,7 @@ func (req *patchResource) Run(ctx context.Context, s *MockKubeAPIServer) error { var updated *unstructured.Unstructured changed := true if req.SubResource == "" { - if resource.TypeInfo != nil { + if resource.ParseableType() != nil { patchOptions := metav1.PatchOptions{} if fieldManager := req.r.URL.Query().Get("fieldManager"); fieldManager != "" { patchOptions.FieldManager = fieldManager @@ -100,7 +101,7 @@ func (req *patchResource) Run(ctx context.Context, s *MockKubeAPIServer) error { } patchOptions.Force = &forceBool } - updated, changed, err = resource.DoServerSideApply(ctx, existingObj, bodyBytes, patchOptions) + updated, changed, err = storage.DoServerSideApply(ctx, resource, existingObj, bodyBytes, patchOptions) if err != nil { klog.Warningf("error from DoServerSideApply: %v", err) return err @@ -123,7 +124,7 @@ func (req *patchResource) Run(ctx context.Context, s *MockKubeAPIServer) error { klog.Infof("skipping write, object not changed") return req.writeResponse(existingObj) } else { - if err := s.storage.UpdateObject(ctx, resource, id, updated); err != nil { + if err := resource.UpdateObject(ctx, id, updated); err != nil { return err } return req.writeResponse(updated) diff --git a/mockkubeapiserver/postresource.go b/mockkubeapiserver/postresource.go index ca89c98b..9e16d162 100644 --- a/mockkubeapiserver/postresource.go +++ b/mockkubeapiserver/postresource.go @@ -69,7 +69,7 @@ func (req *postResource) Run(ctx context.Context, s *MockKubeAPIServer) error { return fmt.Errorf("name must be provided in payload") } - if err := s.storage.CreateObject(ctx, resource, id, obj); err != nil { + if err := resource.CreateObject(ctx, id, obj); err != nil { return err } return req.writeResponse(obj) diff --git a/mockkubeapiserver/putresource.go b/mockkubeapiserver/putresource.go index 927e3122..6c2fae5b 100644 --- a/mockkubeapiserver/putresource.go +++ b/mockkubeapiserver/putresource.go @@ -44,7 +44,7 @@ func (req *putResource) Run(ctx context.Context, s *MockKubeAPIServer) error { id := types.NamespacedName{Namespace: req.Namespace, Name: req.Name} - existingObj, found, err := s.storage.GetObject(ctx, resource, id) + existingObj, found, err := resource.GetObject(ctx, id) if err != nil { return err } @@ -89,7 +89,7 @@ func (req *putResource) Run(ctx context.Context, s *MockKubeAPIServer) error { return req.writeResponse(original) } - if err := s.storage.UpdateObject(ctx, resource, id, updated); err != nil { + if err := resource.UpdateObject(ctx, id, updated); err != nil { return err } return req.writeResponse(updated) diff --git a/mockkubeapiserver/Makefile b/mockkubeapiserver/schemas/Makefile similarity index 100% rename from mockkubeapiserver/Makefile rename to mockkubeapiserver/schemas/Makefile diff --git a/mockkubeapiserver/kubernetes_builtin_schema.go b/mockkubeapiserver/schemas/kubernetes_builtin_schema.go similarity index 98% rename from mockkubeapiserver/kubernetes_builtin_schema.go rename to mockkubeapiserver/schemas/kubernetes_builtin_schema.go index b794fd3b..285c2c71 100644 --- a/mockkubeapiserver/kubernetes_builtin_schema.go +++ b/mockkubeapiserver/schemas/kubernetes_builtin_schema.go @@ -1,4 +1,4 @@ -package mockkubeapiserver +package schemas import ( "fmt" diff --git a/mockkubeapiserver/kubernetes_builtin_schema.meta.yaml b/mockkubeapiserver/schemas/kubernetes_builtin_schema.meta.yaml similarity index 100% rename from mockkubeapiserver/kubernetes_builtin_schema.meta.yaml rename to mockkubeapiserver/schemas/kubernetes_builtin_schema.meta.yaml diff --git a/mockkubeapiserver/kubernetes_builtin_schema.yaml b/mockkubeapiserver/schemas/kubernetes_builtin_schema.yaml similarity index 93% rename from mockkubeapiserver/kubernetes_builtin_schema.yaml rename to mockkubeapiserver/schemas/kubernetes_builtin_schema.yaml index 75fe3b5d..2e802bad 100644 --- a/mockkubeapiserver/kubernetes_builtin_schema.yaml +++ b/mockkubeapiserver/schemas/kubernetes_builtin_schema.yaml @@ -1,4 +1,15 @@ types: +- name: io.k8s.api.admissionregistration.v1.MatchCondition + map: + fields: + - name: expression + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" - name: io.k8s.api.admissionregistration.v1.MutatingWebhook map: fields: @@ -15,6 +26,14 @@ types: - name: failurePolicy type: scalar: string + - name: matchConditions + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.MatchCondition + elementRelationship: associative + keys: + - name - name: matchPolicy type: scalar: string @@ -127,6 +146,14 @@ types: - name: failurePolicy type: scalar: string + - name: matchConditions + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.MatchCondition + elementRelationship: associative + keys: + - name - name: matchPolicy type: scalar: string @@ -185,72 +212,65 @@ types: - name: url type: scalar: string -- name: io.k8s.api.admissionregistration.v1beta1.MutatingWebhook +- name: io.k8s.api.admissionregistration.v1alpha1.AuditAnnotation map: fields: - - name: admissionReviewVersions - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: clientConfig - type: - namedType: io.k8s.api.admissionregistration.v1beta1.WebhookClientConfig - default: {} - - name: failurePolicy + - name: key type: scalar: string - - name: matchPolicy + default: "" + - name: valueExpression type: scalar: string - - name: name + default: "" +- name: io.k8s.api.admissionregistration.v1alpha1.ExpressionWarning + map: + fields: + - name: fieldRef type: scalar: string default: "" - - name: namespaceSelector + - name: warning type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: objectSelector + scalar: string + default: "" +- name: io.k8s.api.admissionregistration.v1alpha1.MatchCondition + map: + fields: + - name: expression type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: reinvocationPolicy + scalar: string + default: "" + - name: name type: scalar: string - - name: rules + default: "" +- name: io.k8s.api.admissionregistration.v1alpha1.MatchResources + map: + fields: + - name: excludeResourceRules type: list: elementType: - namedType: io.k8s.api.admissionregistration.v1beta1.RuleWithOperations + namedType: io.k8s.api.admissionregistration.v1alpha1.NamedRuleWithOperations elementRelationship: atomic - - name: sideEffects - type: - scalar: string - - name: timeoutSeconds - type: - scalar: numeric -- name: io.k8s.api.admissionregistration.v1beta1.MutatingWebhookConfiguration - map: - fields: - - name: apiVersion + - name: matchPolicy type: scalar: string - - name: kind + - name: namespaceSelector type: - scalar: string - - name: metadata + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: objectSelector type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: webhooks + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: resourceRules type: list: elementType: - namedType: io.k8s.api.admissionregistration.v1beta1.MutatingWebhook - elementRelationship: associative - keys: - - name -- name: io.k8s.api.admissionregistration.v1beta1.RuleWithOperations + namedType: io.k8s.api.admissionregistration.v1alpha1.NamedRuleWithOperations + elementRelationship: atomic + elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1alpha1.NamedRuleWithOperations map: fields: - name: apiGroups @@ -271,6 +291,12 @@ types: elementType: scalar: string elementRelationship: atomic + - name: resourceNames + type: + list: + elementType: + scalar: string + elementRelationship: atomic - name: resources type: list: @@ -280,65 +306,64 @@ types: - name: scope type: scalar: string -- name: io.k8s.api.admissionregistration.v1beta1.ServiceReference + elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1alpha1.ParamKind + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1alpha1.ParamRef map: fields: - name: name type: scalar: string - default: "" - name: namespace type: scalar: string - default: "" - - name: path + - name: parameterNotFoundAction type: scalar: string - - name: port + - name: selector type: - scalar: numeric -- name: io.k8s.api.admissionregistration.v1beta1.ValidatingWebhook + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1alpha1.TypeChecking map: fields: - - name: admissionReviewVersions + - name: expressionWarnings type: list: elementType: - scalar: string + namedType: io.k8s.api.admissionregistration.v1alpha1.ExpressionWarning elementRelationship: atomic - - name: clientConfig - type: - namedType: io.k8s.api.admissionregistration.v1beta1.WebhookClientConfig - default: {} - - name: failurePolicy - type: - scalar: string - - name: matchPolicy +- name: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicy + map: + fields: + - name: apiVersion type: scalar: string - - name: name + - name: kind type: scalar: string - default: "" - - name: namespaceSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: objectSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: rules + - name: metadata type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1beta1.RuleWithOperations - elementRelationship: atomic - - name: sideEffects + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec type: - scalar: string - - name: timeoutSeconds + namedType: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicySpec + default: {} + - name: status type: - scalar: numeric -- name: io.k8s.api.admissionregistration.v1beta1.ValidatingWebhookConfiguration + namedType: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyStatus + default: {} +- name: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBinding map: fields: - name: apiVersion @@ -351,256 +376,333 @@ types: type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta default: {} - - name: webhooks + - name: spec type: - list: - elementType: - namedType: io.k8s.api.admissionregistration.v1beta1.ValidatingWebhook - elementRelationship: associative - keys: - - name -- name: io.k8s.api.admissionregistration.v1beta1.WebhookClientConfig + namedType: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingSpec + default: {} +- name: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyBindingSpec map: fields: - - name: caBundle + - name: matchResources type: - scalar: string - - name: service + namedType: io.k8s.api.admissionregistration.v1alpha1.MatchResources + - name: paramRef type: - namedType: io.k8s.api.admissionregistration.v1beta1.ServiceReference - - name: url + namedType: io.k8s.api.admissionregistration.v1alpha1.ParamRef + - name: policyName type: scalar: string -- name: io.k8s.api.apiserverinternal.v1alpha1.ServerStorageVersion + - name: validationActions + type: + list: + elementType: + scalar: string + elementRelationship: associative +- name: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicySpec map: fields: - - name: apiServerID + - name: auditAnnotations + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1alpha1.AuditAnnotation + elementRelationship: atomic + - name: failurePolicy type: scalar: string - - name: decodableVersions + - name: matchConditions type: list: elementType: - scalar: string + namedType: io.k8s.api.admissionregistration.v1alpha1.MatchCondition elementRelationship: associative - - name: encodingVersion + keys: + - name + - name: matchConstraints type: - scalar: string -- name: io.k8s.api.apiserverinternal.v1alpha1.StorageVersion - map: - fields: - - name: apiVersion + namedType: io.k8s.api.admissionregistration.v1alpha1.MatchResources + - name: paramKind type: - scalar: string - - name: kind + namedType: io.k8s.api.admissionregistration.v1alpha1.ParamKind + - name: validations type: - scalar: string - - name: metadata + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1alpha1.Validation + elementRelationship: atomic + - name: variables type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1alpha1.Variable + elementRelationship: associative + keys: + - name +- name: io.k8s.api.admissionregistration.v1alpha1.ValidatingAdmissionPolicyStatus + map: + fields: + - name: conditions type: - namedType: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionSpec - default: {} - - name: status + list: + elementType: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type + - name: observedGeneration type: - namedType: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionStatus - default: {} -- name: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionCondition + scalar: numeric + - name: typeChecking + type: + namedType: io.k8s.api.admissionregistration.v1alpha1.TypeChecking +- name: io.k8s.api.admissionregistration.v1alpha1.Validation map: fields: - - name: lastTransitionTime + - name: expression type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - default: {} + scalar: string + default: "" - name: message type: scalar: string - - name: observedGeneration + - name: messageExpression type: - scalar: numeric + scalar: string - name: reason type: scalar: string - default: "" - - name: status +- name: io.k8s.api.admissionregistration.v1alpha1.Variable + map: + fields: + - name: expression type: scalar: string default: "" - - name: type + - name: name type: scalar: string default: "" -- name: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionSpec - map: - elementType: - scalar: untyped - list: - elementType: - namedType: __untyped_atomic_ - elementRelationship: atomic - map: - elementType: - namedType: __untyped_deduced_ - elementRelationship: separable -- name: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionStatus +- name: io.k8s.api.admissionregistration.v1beta1.AuditAnnotation map: fields: - - name: commonEncodingVersion + - name: key type: scalar: string - - name: conditions + default: "" + - name: valueExpression type: - list: - elementType: - namedType: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionCondition - elementRelationship: associative - keys: - - type - - name: storageVersions - type: - list: - elementType: - namedType: io.k8s.api.apiserverinternal.v1alpha1.ServerStorageVersion - elementRelationship: associative - keys: - - apiServerID -- name: io.k8s.api.apps.v1.ControllerRevision + scalar: string + default: "" +- name: io.k8s.api.admissionregistration.v1beta1.ExpressionWarning map: fields: - - name: apiVersion + - name: fieldRef type: scalar: string - - name: data - type: - namedType: __untyped_atomic_ - default: {} - - name: kind + default: "" + - name: warning type: scalar: string - - name: metadata + default: "" +- name: io.k8s.api.admissionregistration.v1beta1.MatchCondition + map: + fields: + - name: expression type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: revision + scalar: string + default: "" + - name: name type: - scalar: numeric - default: 0 -- name: io.k8s.api.apps.v1.DaemonSet + scalar: string + default: "" +- name: io.k8s.api.admissionregistration.v1beta1.MatchResources map: fields: - - name: apiVersion + - name: excludeResourceRules type: - scalar: string - - name: kind + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1beta1.NamedRuleWithOperations + elementRelationship: atomic + - name: matchPolicy type: scalar: string - - name: metadata + - name: namespaceSelector type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: objectSelector type: - namedType: io.k8s.api.apps.v1.DaemonSetSpec - default: {} - - name: status + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: resourceRules type: - namedType: io.k8s.api.apps.v1.DaemonSetStatus - default: {} -- name: io.k8s.api.apps.v1.DaemonSetCondition + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1beta1.NamedRuleWithOperations + elementRelationship: atomic + elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1beta1.MutatingWebhook map: fields: - - name: lastTransitionTime + - name: admissionReviewVersions type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + list: + elementType: + scalar: string + elementRelationship: atomic + - name: clientConfig + type: + namedType: io.k8s.api.admissionregistration.v1beta1.WebhookClientConfig default: {} - - name: message + - name: failurePolicy type: scalar: string - - name: reason + - name: matchConditions + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1beta1.MatchCondition + elementRelationship: associative + keys: + - name + - name: matchPolicy type: scalar: string - - name: status + - name: name type: scalar: string default: "" - - name: type + - name: namespaceSelector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: objectSelector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: reinvocationPolicy type: scalar: string - default: "" -- name: io.k8s.api.apps.v1.DaemonSetSpec - map: - fields: - - name: minReadySeconds + - name: rules type: - scalar: numeric - - name: revisionHistoryLimit + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.RuleWithOperations + elementRelationship: atomic + - name: sideEffects + type: + scalar: string + - name: timeoutSeconds type: scalar: numeric - - name: selector +- name: io.k8s.api.admissionregistration.v1beta1.MutatingWebhookConfiguration + map: + fields: + - name: apiVersion type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: template + scalar: string + - name: kind type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} - - name: updateStrategy + scalar: string + - name: metadata type: - namedType: io.k8s.api.apps.v1.DaemonSetUpdateStrategy + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta default: {} -- name: io.k8s.api.apps.v1.DaemonSetStatus + - name: webhooks + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1beta1.MutatingWebhook + elementRelationship: associative + keys: + - name +- name: io.k8s.api.admissionregistration.v1beta1.NamedRuleWithOperations map: fields: - - name: collisionCount + - name: apiGroups type: - scalar: numeric - - name: conditions + list: + elementType: + scalar: string + elementRelationship: atomic + - name: apiVersions type: list: elementType: - namedType: io.k8s.api.apps.v1.DaemonSetCondition - elementRelationship: associative - keys: - - type - - name: currentNumberScheduled + scalar: string + elementRelationship: atomic + - name: operations type: - scalar: numeric - default: 0 - - name: desiredNumberScheduled + list: + elementType: + scalar: string + elementRelationship: atomic + - name: resourceNames type: - scalar: numeric - default: 0 - - name: numberAvailable + list: + elementType: + scalar: string + elementRelationship: atomic + - name: resources type: - scalar: numeric - - name: numberMisscheduled + list: + elementType: + scalar: string + elementRelationship: atomic + - name: scope type: - scalar: numeric - default: 0 - - name: numberReady + scalar: string + elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1beta1.ParamKind + map: + fields: + - name: apiVersion type: - scalar: numeric - default: 0 - - name: numberUnavailable + scalar: string + - name: kind type: - scalar: numeric - - name: observedGeneration + scalar: string + elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1beta1.ParamRef + map: + fields: + - name: name type: - scalar: numeric - - name: updatedNumberScheduled + scalar: string + - name: namespace type: - scalar: numeric -- name: io.k8s.api.apps.v1.DaemonSetUpdateStrategy + scalar: string + - name: parameterNotFoundAction + type: + scalar: string + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1beta1.ServiceReference map: fields: - - name: rollingUpdate + - name: name type: - namedType: io.k8s.api.apps.v1.RollingUpdateDaemonSet - - name: type + scalar: string + default: "" + - name: namespace type: scalar: string -- name: io.k8s.api.apps.v1.Deployment + default: "" + - name: path + type: + scalar: string + - name: port + type: + scalar: numeric +- name: io.k8s.api.admissionregistration.v1beta1.TypeChecking + map: + fields: + - name: expressionWarnings + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1beta1.ExpressionWarning + elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicy map: fields: - name: apiVersion @@ -615,108 +717,154 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.apps.v1.DeploymentSpec + namedType: io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicySpec default: {} - name: status type: - namedType: io.k8s.api.apps.v1.DeploymentStatus + namedType: io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyStatus default: {} -- name: io.k8s.api.apps.v1.DeploymentCondition +- name: io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBinding map: fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - default: {} - - name: lastUpdateTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - default: {} - - name: message + - name: apiVersion type: scalar: string - - name: reason + - name: kind type: scalar: string - - name: status + - name: metadata type: - scalar: string - default: "" - - name: type + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec type: - scalar: string - default: "" -- name: io.k8s.api.apps.v1.DeploymentSpec + namedType: io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingSpec + default: {} +- name: io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyBindingSpec map: fields: - - name: minReadySeconds + - name: matchResources type: - scalar: numeric - - name: paused + namedType: io.k8s.api.admissionregistration.v1beta1.MatchResources + - name: paramRef type: - scalar: boolean - - name: progressDeadlineSeconds + namedType: io.k8s.api.admissionregistration.v1beta1.ParamRef + - name: policyName type: - scalar: numeric - - name: replicas + scalar: string + - name: validationActions type: - scalar: numeric - - name: revisionHistoryLimit + list: + elementType: + scalar: string + elementRelationship: associative +- name: io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicySpec + map: + fields: + - name: auditAnnotations type: - scalar: numeric - - name: selector + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1beta1.AuditAnnotation + elementRelationship: atomic + - name: failurePolicy type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: strategy + scalar: string + - name: matchConditions type: - namedType: io.k8s.api.apps.v1.DeploymentStrategy - default: {} - - name: template + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1beta1.MatchCondition + elementRelationship: associative + keys: + - name + - name: matchConstraints type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} -- name: io.k8s.api.apps.v1.DeploymentStatus - map: - fields: - - name: availableReplicas + namedType: io.k8s.api.admissionregistration.v1beta1.MatchResources + - name: paramKind type: - scalar: numeric - - name: collisionCount + namedType: io.k8s.api.admissionregistration.v1beta1.ParamKind + - name: validations type: - scalar: numeric + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1beta1.Validation + elementRelationship: atomic + - name: variables + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1beta1.Variable + elementRelationship: associative + keys: + - name +- name: io.k8s.api.admissionregistration.v1beta1.ValidatingAdmissionPolicyStatus + map: + fields: - name: conditions type: list: elementType: - namedType: io.k8s.api.apps.v1.DeploymentCondition + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition elementRelationship: associative keys: - type - name: observedGeneration type: scalar: numeric - - name: readyReplicas + - name: typeChecking type: - scalar: numeric - - name: replicas + namedType: io.k8s.api.admissionregistration.v1beta1.TypeChecking +- name: io.k8s.api.admissionregistration.v1beta1.ValidatingWebhook + map: + fields: + - name: admissionReviewVersions type: - scalar: numeric - - name: unavailableReplicas + list: + elementType: + scalar: string + elementRelationship: atomic + - name: clientConfig type: - scalar: numeric - - name: updatedReplicas + namedType: io.k8s.api.admissionregistration.v1beta1.WebhookClientConfig + default: {} + - name: failurePolicy type: - scalar: numeric -- name: io.k8s.api.apps.v1.DeploymentStrategy - map: - fields: - - name: rollingUpdate + scalar: string + - name: matchConditions type: - namedType: io.k8s.api.apps.v1.RollingUpdateDeployment - - name: type + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1beta1.MatchCondition + elementRelationship: associative + keys: + - name + - name: matchPolicy type: scalar: string -- name: io.k8s.api.apps.v1.ReplicaSet + - name: name + type: + scalar: string + default: "" + - name: namespaceSelector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: objectSelector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: rules + type: + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1.RuleWithOperations + elementRelationship: atomic + - name: sideEffects + type: + scalar: string + - name: timeoutSeconds + type: + scalar: numeric +- name: io.k8s.api.admissionregistration.v1beta1.ValidatingWebhookConfiguration map: fields: - name: apiVersion @@ -729,106 +877,76 @@ types: type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta default: {} - - name: spec - type: - namedType: io.k8s.api.apps.v1.ReplicaSetSpec - default: {} - - name: status + - name: webhooks type: - namedType: io.k8s.api.apps.v1.ReplicaSetStatus - default: {} -- name: io.k8s.api.apps.v1.ReplicaSetCondition + list: + elementType: + namedType: io.k8s.api.admissionregistration.v1beta1.ValidatingWebhook + elementRelationship: associative + keys: + - name +- name: io.k8s.api.admissionregistration.v1beta1.Validation map: fields: - - name: lastTransitionTime + - name: expression type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - default: {} + scalar: string + default: "" - name: message type: scalar: string + - name: messageExpression + type: + scalar: string - name: reason type: scalar: string - - name: status +- name: io.k8s.api.admissionregistration.v1beta1.Variable + map: + fields: + - name: expression type: scalar: string default: "" - - name: type + - name: name type: scalar: string default: "" -- name: io.k8s.api.apps.v1.ReplicaSetSpec + elementRelationship: atomic +- name: io.k8s.api.admissionregistration.v1beta1.WebhookClientConfig map: fields: - - name: minReadySeconds - type: - scalar: numeric - - name: replicas + - name: caBundle type: - scalar: numeric - - name: selector + scalar: string + - name: service type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: template + namedType: io.k8s.api.admissionregistration.v1beta1.ServiceReference + - name: url type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} -- name: io.k8s.api.apps.v1.ReplicaSetStatus + scalar: string +- name: io.k8s.api.apiserverinternal.v1alpha1.ServerStorageVersion map: fields: - - name: availableReplicas + - name: apiServerID type: - scalar: numeric - - name: conditions + scalar: string + - name: decodableVersions type: list: elementType: - namedType: io.k8s.api.apps.v1.ReplicaSetCondition + scalar: string elementRelationship: associative - keys: - - type - - name: fullyLabeledReplicas - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - default: 0 -- name: io.k8s.api.apps.v1.RollingUpdateDaemonSet - map: - fields: - - name: maxSurge - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.apps.v1.RollingUpdateDeployment - map: - fields: - - name: maxSurge - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.apps.v1.RollingUpdateStatefulSetStrategy - map: - fields: - - name: maxUnavailable + - name: encodingVersion type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: partition + scalar: string + - name: servedVersions type: - scalar: numeric -- name: io.k8s.api.apps.v1.StatefulSet + list: + elementType: + scalar: string + elementRelationship: associative +- name: io.k8s.api.apiserverinternal.v1alpha1.StorageVersion map: fields: - name: apiVersion @@ -843,13 +961,13 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.apps.v1.StatefulSetSpec + namedType: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionSpec default: {} - name: status type: - namedType: io.k8s.api.apps.v1.StatefulSetStatus + namedType: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionStatus default: {} -- name: io.k8s.api.apps.v1.StatefulSetCondition +- name: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionCondition map: fields: - name: lastTransitionTime @@ -859,9 +977,13 @@ types: - name: message type: scalar: string + - name: observedGeneration + type: + scalar: numeric - name: reason type: scalar: string + default: "" - name: status type: scalar: string @@ -870,28 +992,107 @@ types: type: scalar: string default: "" -- name: io.k8s.api.apps.v1.StatefulSetPersistentVolumeClaimRetentionPolicy +- name: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionSpec + map: + elementType: + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable +- name: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionStatus map: fields: - - name: whenDeleted + - name: commonEncodingVersion type: scalar: string - - name: whenScaled + - name: conditions type: - scalar: string -- name: io.k8s.api.apps.v1.StatefulSetSpec - map: - fields: - - name: minReadySeconds + list: + elementType: + namedType: io.k8s.api.apiserverinternal.v1alpha1.StorageVersionCondition + elementRelationship: associative + keys: + - type + - name: storageVersions + type: + list: + elementType: + namedType: io.k8s.api.apiserverinternal.v1alpha1.ServerStorageVersion + elementRelationship: associative + keys: + - apiServerID +- name: io.k8s.api.apps.v1.ControllerRevision + map: + fields: + - name: apiVersion + type: + scalar: string + - name: data + type: + namedType: __untyped_atomic_ + default: {} + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: revision type: scalar: numeric - - name: persistentVolumeClaimRetentionPolicy + default: 0 +- name: io.k8s.api.apps.v1.DaemonSet + map: + fields: + - name: apiVersion type: - namedType: io.k8s.api.apps.v1.StatefulSetPersistentVolumeClaimRetentionPolicy - - name: podManagementPolicy + scalar: string + - name: kind type: scalar: string - - name: replicas + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.apps.v1.DaemonSetSpec + default: {} + - name: status + type: + namedType: io.k8s.api.apps.v1.DaemonSetStatus + default: {} +- name: io.k8s.api.apps.v1.DaemonSetCondition + map: + fields: + - name: lastTransitionTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + default: {} + - name: message + type: + scalar: string + - name: reason + type: + scalar: string + - name: status + type: + scalar: string + default: "" + - name: type + type: + scalar: string + default: "" +- name: io.k8s.api.apps.v1.DaemonSetSpec + map: + fields: + - name: minReadySeconds type: scalar: numeric - name: revisionHistoryLimit @@ -900,31 +1101,17 @@ types: - name: selector type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: serviceName - type: - scalar: string - default: "" - name: template type: namedType: io.k8s.api.core.v1.PodTemplateSpec default: {} - name: updateStrategy type: - namedType: io.k8s.api.apps.v1.StatefulSetUpdateStrategy + namedType: io.k8s.api.apps.v1.DaemonSetUpdateStrategy default: {} - - name: volumeClaimTemplates - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PersistentVolumeClaim - elementRelationship: atomic -- name: io.k8s.api.apps.v1.StatefulSetStatus +- name: io.k8s.api.apps.v1.DaemonSetStatus map: fields: - - name: availableReplicas - type: - scalar: numeric - default: 0 - name: collisionCount type: scalar: numeric @@ -932,63 +1119,48 @@ types: type: list: elementType: - namedType: io.k8s.api.apps.v1.StatefulSetCondition + namedType: io.k8s.api.apps.v1.DaemonSetCondition elementRelationship: associative keys: - type - - name: currentReplicas + - name: currentNumberScheduled type: scalar: numeric - - name: currentRevision + default: 0 + - name: desiredNumberScheduled type: - scalar: string - - name: observedGeneration + scalar: numeric + default: 0 + - name: numberAvailable type: scalar: numeric - - name: readyReplicas + - name: numberMisscheduled type: scalar: numeric - - name: replicas + default: 0 + - name: numberReady type: scalar: numeric default: 0 - - name: updateRevision + - name: numberUnavailable type: - scalar: string - - name: updatedReplicas + scalar: numeric + - name: observedGeneration type: scalar: numeric -- name: io.k8s.api.apps.v1.StatefulSetUpdateStrategy + - name: updatedNumberScheduled + type: + scalar: numeric +- name: io.k8s.api.apps.v1.DaemonSetUpdateStrategy map: fields: - name: rollingUpdate type: - namedType: io.k8s.api.apps.v1.RollingUpdateStatefulSetStrategy + namedType: io.k8s.api.apps.v1.RollingUpdateDaemonSet - name: type type: scalar: string -- name: io.k8s.api.apps.v1beta1.ControllerRevision - map: - fields: - - name: apiVersion - type: - scalar: string - - name: data - type: - namedType: __untyped_atomic_ - default: {} - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: revision - type: - scalar: numeric - default: 0 -- name: io.k8s.api.apps.v1beta1.Deployment +- name: io.k8s.api.apps.v1.Deployment map: fields: - name: apiVersion @@ -1003,13 +1175,13 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.apps.v1beta1.DeploymentSpec + namedType: io.k8s.api.apps.v1.DeploymentSpec default: {} - name: status type: - namedType: io.k8s.api.apps.v1beta1.DeploymentStatus + namedType: io.k8s.api.apps.v1.DeploymentStatus default: {} -- name: io.k8s.api.apps.v1beta1.DeploymentCondition +- name: io.k8s.api.apps.v1.DeploymentCondition map: fields: - name: lastTransitionTime @@ -1034,7 +1206,7 @@ types: type: scalar: string default: "" -- name: io.k8s.api.apps.v1beta1.DeploymentSpec +- name: io.k8s.api.apps.v1.DeploymentSpec map: fields: - name: minReadySeconds @@ -1052,21 +1224,18 @@ types: - name: revisionHistoryLimit type: scalar: numeric - - name: rollbackTo - type: - namedType: io.k8s.api.apps.v1beta1.RollbackConfig - name: selector type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - name: strategy type: - namedType: io.k8s.api.apps.v1beta1.DeploymentStrategy + namedType: io.k8s.api.apps.v1.DeploymentStrategy default: {} - name: template type: namedType: io.k8s.api.core.v1.PodTemplateSpec default: {} -- name: io.k8s.api.apps.v1beta1.DeploymentStatus +- name: io.k8s.api.apps.v1.DeploymentStatus map: fields: - name: availableReplicas @@ -1079,7 +1248,7 @@ types: type: list: elementType: - namedType: io.k8s.api.apps.v1beta1.DeploymentCondition + namedType: io.k8s.api.apps.v1.DeploymentCondition elementRelationship: associative keys: - type @@ -1098,40 +1267,16 @@ types: - name: updatedReplicas type: scalar: numeric -- name: io.k8s.api.apps.v1beta1.DeploymentStrategy +- name: io.k8s.api.apps.v1.DeploymentStrategy map: fields: - name: rollingUpdate type: - namedType: io.k8s.api.apps.v1beta1.RollingUpdateDeployment + namedType: io.k8s.api.apps.v1.RollingUpdateDeployment - name: type type: scalar: string -- name: io.k8s.api.apps.v1beta1.RollbackConfig - map: - fields: - - name: revision - type: - scalar: numeric -- name: io.k8s.api.apps.v1beta1.RollingUpdateDeployment - map: - fields: - - name: maxSurge - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.apps.v1beta1.RollingUpdateStatefulSetStrategy - map: - fields: - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: partition - type: - scalar: numeric -- name: io.k8s.api.apps.v1beta1.StatefulSet +- name: io.k8s.api.apps.v1.ReplicaSet map: fields: - name: apiVersion @@ -1146,13 +1291,13 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.apps.v1beta1.StatefulSetSpec + namedType: io.k8s.api.apps.v1.ReplicaSetSpec default: {} - name: status type: - namedType: io.k8s.api.apps.v1beta1.StatefulSetStatus + namedType: io.k8s.api.apps.v1.ReplicaSetStatus default: {} -- name: io.k8s.api.apps.v1beta1.StatefulSetCondition +- name: io.k8s.api.apps.v1.ReplicaSetCondition map: fields: - name: lastTransitionTime @@ -1173,78 +1318,39 @@ types: type: scalar: string default: "" -- name: io.k8s.api.apps.v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy - map: - fields: - - name: whenDeleted - type: - scalar: string - - name: whenScaled - type: - scalar: string -- name: io.k8s.api.apps.v1beta1.StatefulSetSpec +- name: io.k8s.api.apps.v1.ReplicaSetSpec map: fields: - name: minReadySeconds type: scalar: numeric - - name: persistentVolumeClaimRetentionPolicy - type: - namedType: io.k8s.api.apps.v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy - - name: podManagementPolicy - type: - scalar: string - name: replicas type: scalar: numeric - - name: revisionHistoryLimit - type: - scalar: numeric - name: selector type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: serviceName - type: - scalar: string - default: "" - name: template type: namedType: io.k8s.api.core.v1.PodTemplateSpec default: {} - - name: updateStrategy - type: - namedType: io.k8s.api.apps.v1beta1.StatefulSetUpdateStrategy - default: {} - - name: volumeClaimTemplates - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PersistentVolumeClaim - elementRelationship: atomic -- name: io.k8s.api.apps.v1beta1.StatefulSetStatus +- name: io.k8s.api.apps.v1.ReplicaSetStatus map: fields: - name: availableReplicas type: scalar: numeric - default: 0 - - name: collisionCount - type: - scalar: numeric - name: conditions type: list: elementType: - namedType: io.k8s.api.apps.v1beta1.StatefulSetCondition + namedType: io.k8s.api.apps.v1.ReplicaSetCondition elementRelationship: associative keys: - type - - name: currentReplicas + - name: fullyLabeledReplicas type: scalar: numeric - - name: currentRevision - type: - scalar: string - name: observedGeneration type: scalar: numeric @@ -1255,43 +1361,34 @@ types: type: scalar: numeric default: 0 - - name: updateRevision - type: - scalar: string - - name: updatedReplicas - type: - scalar: numeric -- name: io.k8s.api.apps.v1beta1.StatefulSetUpdateStrategy +- name: io.k8s.api.apps.v1.RollingUpdateDaemonSet map: fields: - - name: rollingUpdate + - name: maxSurge type: - namedType: io.k8s.api.apps.v1beta1.RollingUpdateStatefulSetStrategy - - name: type + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + - name: maxUnavailable type: - scalar: string -- name: io.k8s.api.apps.v1beta2.ControllerRevision + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString +- name: io.k8s.api.apps.v1.RollingUpdateDeployment map: fields: - - name: apiVersion - type: - scalar: string - - name: data + - name: maxSurge type: - namedType: __untyped_atomic_ - default: {} - - name: kind + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + - name: maxUnavailable type: - scalar: string - - name: metadata + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString +- name: io.k8s.api.apps.v1.RollingUpdateStatefulSetStrategy + map: + fields: + - name: maxUnavailable type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: revision + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + - name: partition type: scalar: numeric - default: 0 -- name: io.k8s.api.apps.v1beta2.DaemonSet +- name: io.k8s.api.apps.v1.StatefulSet map: fields: - name: apiVersion @@ -1306,13 +1403,13 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.apps.v1beta2.DaemonSetSpec + namedType: io.k8s.api.apps.v1.StatefulSetSpec default: {} - name: status type: - namedType: io.k8s.api.apps.v1beta2.DaemonSetStatus + namedType: io.k8s.api.apps.v1.StatefulSetStatus default: {} -- name: io.k8s.api.apps.v1beta2.DaemonSetCondition +- name: io.k8s.api.apps.v1.StatefulSetCondition map: fields: - name: lastTransitionTime @@ -1333,29 +1430,71 @@ types: type: scalar: string default: "" -- name: io.k8s.api.apps.v1beta2.DaemonSetSpec +- name: io.k8s.api.apps.v1.StatefulSetOrdinals + map: + fields: + - name: start + type: + scalar: numeric + default: 0 +- name: io.k8s.api.apps.v1.StatefulSetPersistentVolumeClaimRetentionPolicy + map: + fields: + - name: whenDeleted + type: + scalar: string + - name: whenScaled + type: + scalar: string +- name: io.k8s.api.apps.v1.StatefulSetSpec map: fields: - name: minReadySeconds type: scalar: numeric + - name: ordinals + type: + namedType: io.k8s.api.apps.v1.StatefulSetOrdinals + - name: persistentVolumeClaimRetentionPolicy + type: + namedType: io.k8s.api.apps.v1.StatefulSetPersistentVolumeClaimRetentionPolicy + - name: podManagementPolicy + type: + scalar: string + - name: replicas + type: + scalar: numeric - name: revisionHistoryLimit type: scalar: numeric - name: selector type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: serviceName + type: + scalar: string + default: "" - name: template type: namedType: io.k8s.api.core.v1.PodTemplateSpec default: {} - name: updateStrategy type: - namedType: io.k8s.api.apps.v1beta2.DaemonSetUpdateStrategy + namedType: io.k8s.api.apps.v1.StatefulSetUpdateStrategy default: {} -- name: io.k8s.api.apps.v1beta2.DaemonSetStatus + - name: volumeClaimTemplates + type: + list: + elementType: + namedType: io.k8s.api.core.v1.PersistentVolumeClaim + elementRelationship: atomic +- name: io.k8s.api.apps.v1.StatefulSetStatus map: fields: + - name: availableReplicas + type: + scalar: numeric + default: 0 - name: collisionCount type: scalar: numeric @@ -1363,48 +1502,63 @@ types: type: list: elementType: - namedType: io.k8s.api.apps.v1beta2.DaemonSetCondition + namedType: io.k8s.api.apps.v1.StatefulSetCondition elementRelationship: associative keys: - type - - name: currentNumberScheduled + - name: currentReplicas type: scalar: numeric - default: 0 - - name: desiredNumberScheduled + - name: currentRevision type: - scalar: numeric - default: 0 - - name: numberAvailable + scalar: string + - name: observedGeneration type: scalar: numeric - - name: numberMisscheduled + - name: readyReplicas type: scalar: numeric - default: 0 - - name: numberReady + - name: replicas type: scalar: numeric default: 0 - - name: numberUnavailable - type: - scalar: numeric - - name: observedGeneration + - name: updateRevision type: - scalar: numeric - - name: updatedNumberScheduled + scalar: string + - name: updatedReplicas type: scalar: numeric -- name: io.k8s.api.apps.v1beta2.DaemonSetUpdateStrategy +- name: io.k8s.api.apps.v1.StatefulSetUpdateStrategy map: fields: - name: rollingUpdate type: - namedType: io.k8s.api.apps.v1beta2.RollingUpdateDaemonSet + namedType: io.k8s.api.apps.v1.RollingUpdateStatefulSetStrategy - name: type type: scalar: string -- name: io.k8s.api.apps.v1beta2.Deployment +- name: io.k8s.api.apps.v1beta1.ControllerRevision + map: + fields: + - name: apiVersion + type: + scalar: string + - name: data + type: + namedType: __untyped_atomic_ + default: {} + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: revision + type: + scalar: numeric + default: 0 +- name: io.k8s.api.apps.v1beta1.Deployment map: fields: - name: apiVersion @@ -1419,13 +1573,13 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.apps.v1beta2.DeploymentSpec + namedType: io.k8s.api.apps.v1beta1.DeploymentSpec default: {} - name: status type: - namedType: io.k8s.api.apps.v1beta2.DeploymentStatus + namedType: io.k8s.api.apps.v1beta1.DeploymentStatus default: {} -- name: io.k8s.api.apps.v1beta2.DeploymentCondition +- name: io.k8s.api.apps.v1beta1.DeploymentCondition map: fields: - name: lastTransitionTime @@ -1450,7 +1604,7 @@ types: type: scalar: string default: "" -- name: io.k8s.api.apps.v1beta2.DeploymentSpec +- name: io.k8s.api.apps.v1beta1.DeploymentSpec map: fields: - name: minReadySeconds @@ -1468,18 +1622,21 @@ types: - name: revisionHistoryLimit type: scalar: numeric + - name: rollbackTo + type: + namedType: io.k8s.api.apps.v1beta1.RollbackConfig - name: selector type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - name: strategy type: - namedType: io.k8s.api.apps.v1beta2.DeploymentStrategy + namedType: io.k8s.api.apps.v1beta1.DeploymentStrategy default: {} - name: template type: namedType: io.k8s.api.core.v1.PodTemplateSpec default: {} -- name: io.k8s.api.apps.v1beta2.DeploymentStatus +- name: io.k8s.api.apps.v1beta1.DeploymentStatus map: fields: - name: availableReplicas @@ -1492,7 +1649,7 @@ types: type: list: elementType: - namedType: io.k8s.api.apps.v1beta2.DeploymentCondition + namedType: io.k8s.api.apps.v1beta1.DeploymentCondition elementRelationship: associative keys: - type @@ -1511,16 +1668,40 @@ types: - name: updatedReplicas type: scalar: numeric -- name: io.k8s.api.apps.v1beta2.DeploymentStrategy +- name: io.k8s.api.apps.v1beta1.DeploymentStrategy map: fields: - name: rollingUpdate type: - namedType: io.k8s.api.apps.v1beta2.RollingUpdateDeployment + namedType: io.k8s.api.apps.v1beta1.RollingUpdateDeployment - name: type type: scalar: string -- name: io.k8s.api.apps.v1beta2.ReplicaSet +- name: io.k8s.api.apps.v1beta1.RollbackConfig + map: + fields: + - name: revision + type: + scalar: numeric +- name: io.k8s.api.apps.v1beta1.RollingUpdateDeployment + map: + fields: + - name: maxSurge + type: + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + - name: maxUnavailable + type: + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString +- name: io.k8s.api.apps.v1beta1.RollingUpdateStatefulSetStrategy + map: + fields: + - name: maxUnavailable + type: + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + - name: partition + type: + scalar: numeric +- name: io.k8s.api.apps.v1beta1.StatefulSet map: fields: - name: apiVersion @@ -1535,13 +1716,13 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.apps.v1beta2.ReplicaSetSpec + namedType: io.k8s.api.apps.v1beta1.StatefulSetSpec default: {} - name: status type: - namedType: io.k8s.api.apps.v1beta2.ReplicaSetStatus + namedType: io.k8s.api.apps.v1beta1.StatefulSetStatus default: {} -- name: io.k8s.api.apps.v1beta2.ReplicaSetCondition +- name: io.k8s.api.apps.v1beta1.StatefulSetCondition map: fields: - name: lastTransitionTime @@ -1562,39 +1743,88 @@ types: type: scalar: string default: "" -- name: io.k8s.api.apps.v1beta2.ReplicaSetSpec +- name: io.k8s.api.apps.v1beta1.StatefulSetOrdinals + map: + fields: + - name: start + type: + scalar: numeric + default: 0 +- name: io.k8s.api.apps.v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy + map: + fields: + - name: whenDeleted + type: + scalar: string + - name: whenScaled + type: + scalar: string +- name: io.k8s.api.apps.v1beta1.StatefulSetSpec map: fields: - name: minReadySeconds type: scalar: numeric + - name: ordinals + type: + namedType: io.k8s.api.apps.v1beta1.StatefulSetOrdinals + - name: persistentVolumeClaimRetentionPolicy + type: + namedType: io.k8s.api.apps.v1beta1.StatefulSetPersistentVolumeClaimRetentionPolicy + - name: podManagementPolicy + type: + scalar: string - name: replicas type: scalar: numeric + - name: revisionHistoryLimit + type: + scalar: numeric - name: selector type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: serviceName + type: + scalar: string + default: "" - name: template type: namedType: io.k8s.api.core.v1.PodTemplateSpec default: {} -- name: io.k8s.api.apps.v1beta2.ReplicaSetStatus + - name: updateStrategy + type: + namedType: io.k8s.api.apps.v1beta1.StatefulSetUpdateStrategy + default: {} + - name: volumeClaimTemplates + type: + list: + elementType: + namedType: io.k8s.api.core.v1.PersistentVolumeClaim + elementRelationship: atomic +- name: io.k8s.api.apps.v1beta1.StatefulSetStatus map: fields: - name: availableReplicas type: scalar: numeric + default: 0 + - name: collisionCount + type: + scalar: numeric - name: conditions type: list: elementType: - namedType: io.k8s.api.apps.v1beta2.ReplicaSetCondition + namedType: io.k8s.api.apps.v1beta1.StatefulSetCondition elementRelationship: associative keys: - type - - name: fullyLabeledReplicas + - name: currentReplicas type: scalar: numeric + - name: currentRevision + type: + scalar: string - name: observedGeneration type: scalar: numeric @@ -1605,34 +1835,43 @@ types: type: scalar: numeric default: 0 -- name: io.k8s.api.apps.v1beta2.RollingUpdateDaemonSet - map: - fields: - - name: maxSurge + - name: updateRevision type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: maxUnavailable + scalar: string + - name: updatedReplicas type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.apps.v1beta2.RollingUpdateDeployment + scalar: numeric +- name: io.k8s.api.apps.v1beta1.StatefulSetUpdateStrategy map: fields: - - name: maxSurge + - name: rollingUpdate type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: maxUnavailable + namedType: io.k8s.api.apps.v1beta1.RollingUpdateStatefulSetStrategy + - name: type type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.apps.v1beta2.RollingUpdateStatefulSetStrategy + scalar: string +- name: io.k8s.api.apps.v1beta2.ControllerRevision map: fields: - - name: maxUnavailable + - name: apiVersion type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: partition + scalar: string + - name: data + type: + namedType: __untyped_atomic_ + default: {} + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: revision type: scalar: numeric -- name: io.k8s.api.apps.v1beta2.StatefulSet + default: 0 +- name: io.k8s.api.apps.v1beta2.DaemonSet map: fields: - name: apiVersion @@ -1647,13 +1886,13 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.apps.v1beta2.StatefulSetSpec + namedType: io.k8s.api.apps.v1beta2.DaemonSetSpec default: {} - name: status type: - namedType: io.k8s.api.apps.v1beta2.StatefulSetStatus + namedType: io.k8s.api.apps.v1beta2.DaemonSetStatus default: {} -- name: io.k8s.api.apps.v1beta2.StatefulSetCondition +- name: io.k8s.api.apps.v1beta2.DaemonSetCondition map: fields: - name: lastTransitionTime @@ -1674,61 +1913,29 @@ types: type: scalar: string default: "" -- name: io.k8s.api.apps.v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy - map: - fields: - - name: whenDeleted - type: - scalar: string - - name: whenScaled - type: - scalar: string -- name: io.k8s.api.apps.v1beta2.StatefulSetSpec +- name: io.k8s.api.apps.v1beta2.DaemonSetSpec map: fields: - name: minReadySeconds type: scalar: numeric - - name: persistentVolumeClaimRetentionPolicy - type: - namedType: io.k8s.api.apps.v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy - - name: podManagementPolicy - type: - scalar: string - - name: replicas - type: - scalar: numeric - name: revisionHistoryLimit type: scalar: numeric - name: selector type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: serviceName - type: - scalar: string - default: "" - name: template type: namedType: io.k8s.api.core.v1.PodTemplateSpec default: {} - name: updateStrategy type: - namedType: io.k8s.api.apps.v1beta2.StatefulSetUpdateStrategy + namedType: io.k8s.api.apps.v1beta2.DaemonSetUpdateStrategy default: {} - - name: volumeClaimTemplates - type: - list: - elementType: - namedType: io.k8s.api.core.v1.PersistentVolumeClaim - elementRelationship: atomic -- name: io.k8s.api.apps.v1beta2.StatefulSetStatus +- name: io.k8s.api.apps.v1beta2.DaemonSetStatus map: fields: - - name: availableReplicas - type: - scalar: numeric - default: 0 - name: collisionCount type: scalar: numeric @@ -1736,57 +1943,48 @@ types: type: list: elementType: - namedType: io.k8s.api.apps.v1beta2.StatefulSetCondition + namedType: io.k8s.api.apps.v1beta2.DaemonSetCondition elementRelationship: associative keys: - type - - name: currentReplicas + - name: currentNumberScheduled type: scalar: numeric - - name: currentRevision + default: 0 + - name: desiredNumberScheduled type: - scalar: string - - name: observedGeneration + scalar: numeric + default: 0 + - name: numberAvailable type: scalar: numeric - - name: readyReplicas + - name: numberMisscheduled type: scalar: numeric - - name: replicas + default: 0 + - name: numberReady type: scalar: numeric default: 0 - - name: updateRevision + - name: numberUnavailable type: - scalar: string - - name: updatedReplicas + scalar: numeric + - name: observedGeneration type: scalar: numeric -- name: io.k8s.api.apps.v1beta2.StatefulSetUpdateStrategy + - name: updatedNumberScheduled + type: + scalar: numeric +- name: io.k8s.api.apps.v1beta2.DaemonSetUpdateStrategy map: fields: - name: rollingUpdate type: - namedType: io.k8s.api.apps.v1beta2.RollingUpdateStatefulSetStrategy + namedType: io.k8s.api.apps.v1beta2.RollingUpdateDaemonSet - name: type type: scalar: string -- name: io.k8s.api.autoscaling.v1.CrossVersionObjectReference - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - default: "" - - name: name - type: - scalar: string - default: "" - elementRelationship: atomic -- name: io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler +- name: io.k8s.api.apps.v1beta2.Deployment map: fields: - name: apiVersion @@ -1801,80 +1999,108 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerSpec + namedType: io.k8s.api.apps.v1beta2.DeploymentSpec default: {} - name: status type: - namedType: io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerStatus + namedType: io.k8s.api.apps.v1beta2.DeploymentStatus default: {} -- name: io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerSpec +- name: io.k8s.api.apps.v1beta2.DeploymentCondition map: fields: - - name: maxReplicas + - name: lastTransitionTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + default: {} + - name: lastUpdateTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + default: {} + - name: message + type: + scalar: string + - name: reason + type: + scalar: string + - name: status + type: + scalar: string + default: "" + - name: type + type: + scalar: string + default: "" +- name: io.k8s.api.apps.v1beta2.DeploymentSpec + map: + fields: + - name: minReadySeconds type: scalar: numeric - default: 0 - - name: minReplicas + - name: paused + type: + scalar: boolean + - name: progressDeadlineSeconds type: scalar: numeric - - name: scaleTargetRef + - name: replicas type: - namedType: io.k8s.api.autoscaling.v1.CrossVersionObjectReference - default: {} - - name: targetCPUUtilizationPercentage + scalar: numeric + - name: revisionHistoryLimit type: scalar: numeric -- name: io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerStatus + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: strategy + type: + namedType: io.k8s.api.apps.v1beta2.DeploymentStrategy + default: {} + - name: template + type: + namedType: io.k8s.api.core.v1.PodTemplateSpec + default: {} +- name: io.k8s.api.apps.v1beta2.DeploymentStatus map: fields: - - name: currentCPUUtilizationPercentage - type: - scalar: numeric - - name: currentReplicas + - name: availableReplicas type: scalar: numeric - default: 0 - - name: desiredReplicas + - name: collisionCount type: scalar: numeric - default: 0 - - name: lastScaleTime + - name: conditions type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + list: + elementType: + namedType: io.k8s.api.apps.v1beta2.DeploymentCondition + elementRelationship: associative + keys: + - type - name: observedGeneration type: scalar: numeric -- name: io.k8s.api.autoscaling.v2.ContainerResourceMetricSource - map: - fields: - - name: container + - name: readyReplicas type: - scalar: string - default: "" - - name: name + scalar: numeric + - name: replicas type: - scalar: string - default: "" - - name: target + scalar: numeric + - name: unavailableReplicas type: - namedType: io.k8s.api.autoscaling.v2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2.ContainerResourceMetricStatus + scalar: numeric + - name: updatedReplicas + type: + scalar: numeric +- name: io.k8s.api.apps.v1beta2.DeploymentStrategy map: fields: - - name: container - type: - scalar: string - default: "" - - name: current + - name: rollingUpdate type: - namedType: io.k8s.api.autoscaling.v2.MetricValueStatus - default: {} - - name: name + namedType: io.k8s.api.apps.v1beta2.RollingUpdateDeployment + - name: type type: scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2.CrossVersionObjectReference +- name: io.k8s.api.apps.v1beta2.ReplicaSet map: fields: - name: apiVersion @@ -1883,64 +2109,110 @@ types: - name: kind type: scalar: string - default: "" - - name: name + - name: metadata type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2.ExternalMetricSource - map: - fields: - - name: metric + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier + namedType: io.k8s.api.apps.v1beta2.ReplicaSetSpec default: {} - - name: target + - name: status type: - namedType: io.k8s.api.autoscaling.v2.MetricTarget + namedType: io.k8s.api.apps.v1beta2.ReplicaSetStatus default: {} -- name: io.k8s.api.autoscaling.v2.ExternalMetricStatus +- name: io.k8s.api.apps.v1beta2.ReplicaSetCondition map: fields: - - name: current + - name: lastTransitionTime type: - namedType: io.k8s.api.autoscaling.v2.MetricValueStatus + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time default: {} - - name: metric + - name: message type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier - default: {} -- name: io.k8s.api.autoscaling.v2.HPAScalingPolicy - map: - fields: - - name: periodSeconds + scalar: string + - name: reason type: - scalar: numeric - default: 0 + scalar: string + - name: status + type: + scalar: string + default: "" - name: type type: scalar: string default: "" - - name: value +- name: io.k8s.api.apps.v1beta2.ReplicaSetSpec + map: + fields: + - name: minReadySeconds type: scalar: numeric - default: 0 -- name: io.k8s.api.autoscaling.v2.HPAScalingRules + - name: replicas + type: + scalar: numeric + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: template + type: + namedType: io.k8s.api.core.v1.PodTemplateSpec + default: {} +- name: io.k8s.api.apps.v1beta2.ReplicaSetStatus map: fields: - - name: policies + - name: availableReplicas + type: + scalar: numeric + - name: conditions type: list: elementType: - namedType: io.k8s.api.autoscaling.v2.HPAScalingPolicy - elementRelationship: atomic - - name: selectPolicy + namedType: io.k8s.api.apps.v1beta2.ReplicaSetCondition + elementRelationship: associative + keys: + - type + - name: fullyLabeledReplicas type: - scalar: string - - name: stabilizationWindowSeconds + scalar: numeric + - name: observedGeneration type: scalar: numeric -- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler + - name: readyReplicas + type: + scalar: numeric + - name: replicas + type: + scalar: numeric + default: 0 +- name: io.k8s.api.apps.v1beta2.RollingUpdateDaemonSet + map: + fields: + - name: maxSurge + type: + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + - name: maxUnavailable + type: + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString +- name: io.k8s.api.apps.v1beta2.RollingUpdateDeployment + map: + fields: + - name: maxSurge + type: + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + - name: maxUnavailable + type: + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString +- name: io.k8s.api.apps.v1beta2.RollingUpdateStatefulSetStrategy + map: + fields: + - name: maxUnavailable + type: + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + - name: partition + type: + scalar: numeric +- name: io.k8s.api.apps.v1beta2.StatefulSet map: fields: - name: apiVersion @@ -1955,22 +2227,13 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerSpec + namedType: io.k8s.api.apps.v1beta2.StatefulSetSpec default: {} - name: status type: - namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerStatus + namedType: io.k8s.api.apps.v1beta2.StatefulSetStatus default: {} -- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerBehavior - map: - fields: - - name: scaleDown - type: - namedType: io.k8s.api.autoscaling.v2.HPAScalingRules - - name: scaleUp - type: - namedType: io.k8s.api.autoscaling.v2.HPAScalingRules -- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerCondition +- name: io.k8s.api.apps.v1beta2.StatefulSetCondition map: fields: - name: lastTransitionTime @@ -1991,216 +2254,187 @@ types: type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerSpec +- name: io.k8s.api.apps.v1beta2.StatefulSetOrdinals map: fields: - - name: behavior - type: - namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerBehavior - - name: maxReplicas + - name: start type: scalar: numeric default: 0 - - name: metrics +- name: io.k8s.api.apps.v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy + map: + fields: + - name: whenDeleted type: - list: - elementType: - namedType: io.k8s.api.autoscaling.v2.MetricSpec - elementRelationship: atomic - - name: minReplicas + scalar: string + - name: whenScaled + type: + scalar: string +- name: io.k8s.api.apps.v1beta2.StatefulSetSpec + map: + fields: + - name: minReadySeconds type: scalar: numeric - - name: scaleTargetRef + - name: ordinals type: - namedType: io.k8s.api.autoscaling.v2.CrossVersionObjectReference + namedType: io.k8s.api.apps.v1beta2.StatefulSetOrdinals + - name: persistentVolumeClaimRetentionPolicy + type: + namedType: io.k8s.api.apps.v1beta2.StatefulSetPersistentVolumeClaimRetentionPolicy + - name: podManagementPolicy + type: + scalar: string + - name: replicas + type: + scalar: numeric + - name: revisionHistoryLimit + type: + scalar: numeric + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: serviceName + type: + scalar: string + default: "" + - name: template + type: + namedType: io.k8s.api.core.v1.PodTemplateSpec default: {} -- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerStatus + - name: updateStrategy + type: + namedType: io.k8s.api.apps.v1beta2.StatefulSetUpdateStrategy + default: {} + - name: volumeClaimTemplates + type: + list: + elementType: + namedType: io.k8s.api.core.v1.PersistentVolumeClaim + elementRelationship: atomic +- name: io.k8s.api.apps.v1beta2.StatefulSetStatus map: fields: + - name: availableReplicas + type: + scalar: numeric + default: 0 + - name: collisionCount + type: + scalar: numeric - name: conditions type: list: elementType: - namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerCondition + namedType: io.k8s.api.apps.v1beta2.StatefulSetCondition elementRelationship: associative keys: - type - - name: currentMetrics - type: - list: - elementType: - namedType: io.k8s.api.autoscaling.v2.MetricStatus - elementRelationship: atomic - name: currentReplicas type: scalar: numeric - - name: desiredReplicas + - name: currentRevision + type: + scalar: string + - name: observedGeneration type: scalar: numeric - default: 0 - - name: lastScaleTime + - name: readyReplicas type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: observedGeneration + scalar: numeric + - name: replicas type: scalar: numeric -- name: io.k8s.api.autoscaling.v2.MetricIdentifier - map: - fields: - - name: name + default: 0 + - name: updateRevision type: scalar: string - default: "" - - name: selector + - name: updatedReplicas type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: io.k8s.api.autoscaling.v2.MetricSpec + scalar: numeric +- name: io.k8s.api.apps.v1beta2.StatefulSetUpdateStrategy map: fields: - - name: containerResource - type: - namedType: io.k8s.api.autoscaling.v2.ContainerResourceMetricSource - - name: external - type: - namedType: io.k8s.api.autoscaling.v2.ExternalMetricSource - - name: object - type: - namedType: io.k8s.api.autoscaling.v2.ObjectMetricSource - - name: pods - type: - namedType: io.k8s.api.autoscaling.v2.PodsMetricSource - - name: resource + - name: rollingUpdate type: - namedType: io.k8s.api.autoscaling.v2.ResourceMetricSource + namedType: io.k8s.api.apps.v1beta2.RollingUpdateStatefulSetStrategy - name: type type: scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2.MetricStatus +- name: io.k8s.api.autoscaling.v1.CrossVersionObjectReference map: fields: - - name: containerResource - type: - namedType: io.k8s.api.autoscaling.v2.ContainerResourceMetricStatus - - name: external - type: - namedType: io.k8s.api.autoscaling.v2.ExternalMetricStatus - - name: object - type: - namedType: io.k8s.api.autoscaling.v2.ObjectMetricStatus - - name: pods + - name: apiVersion type: - namedType: io.k8s.api.autoscaling.v2.PodsMetricStatus - - name: resource + scalar: string + - name: kind type: - namedType: io.k8s.api.autoscaling.v2.ResourceMetricStatus - - name: type + scalar: string + default: "" + - name: name type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2.MetricTarget + elementRelationship: atomic +- name: io.k8s.api.autoscaling.v1.HorizontalPodAutoscaler map: fields: - - name: averageUtilization - type: - scalar: numeric - - name: averageValue + - name: apiVersion type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: type + scalar: string + - name: kind type: scalar: string - default: "" - - name: value + - name: metadata type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2.MetricValueStatus - map: - fields: - - name: averageUtilization - type: - scalar: numeric - - name: averageValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: value - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2.ObjectMetricSource - map: - fields: - - name: describedObject - type: - namedType: io.k8s.api.autoscaling.v2.CrossVersionObjectReference + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta default: {} - - name: metric + - name: spec type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier + namedType: io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerSpec default: {} - - name: target + - name: status type: - namedType: io.k8s.api.autoscaling.v2.MetricTarget + namedType: io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerStatus default: {} -- name: io.k8s.api.autoscaling.v2.ObjectMetricStatus +- name: io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerSpec map: fields: - - name: current - type: - namedType: io.k8s.api.autoscaling.v2.MetricValueStatus - default: {} - - name: describedObject + - name: maxReplicas type: - namedType: io.k8s.api.autoscaling.v2.CrossVersionObjectReference - default: {} - - name: metric + scalar: numeric + default: 0 + - name: minReplicas type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier - default: {} -- name: io.k8s.api.autoscaling.v2.PodsMetricSource - map: - fields: - - name: metric + scalar: numeric + - name: scaleTargetRef type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier + namedType: io.k8s.api.autoscaling.v1.CrossVersionObjectReference default: {} - - name: target + - name: targetCPUUtilizationPercentage type: - namedType: io.k8s.api.autoscaling.v2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2.PodsMetricStatus + scalar: numeric +- name: io.k8s.api.autoscaling.v1.HorizontalPodAutoscalerStatus map: fields: - - name: current - type: - namedType: io.k8s.api.autoscaling.v2.MetricValueStatus - default: {} - - name: metric + - name: currentCPUUtilizationPercentage type: - namedType: io.k8s.api.autoscaling.v2.MetricIdentifier - default: {} -- name: io.k8s.api.autoscaling.v2.ResourceMetricSource - map: - fields: - - name: name + scalar: numeric + - name: currentReplicas type: - scalar: string - default: "" - - name: target + scalar: numeric + default: 0 + - name: desiredReplicas type: - namedType: io.k8s.api.autoscaling.v2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2.ResourceMetricStatus - map: - fields: - - name: current + scalar: numeric + default: 0 + - name: lastScaleTime type: - namedType: io.k8s.api.autoscaling.v2.MetricValueStatus - default: {} - - name: name + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + - name: observedGeneration type: - scalar: string - default: "" -- name: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource + scalar: numeric +- name: io.k8s.api.autoscaling.v2.ContainerResourceMetricSource map: fields: - name: container @@ -2211,31 +2445,26 @@ types: type: scalar: string default: "" - - name: targetAverageUtilization - type: - scalar: numeric - - name: targetAverageValue + - name: target type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricStatus + namedType: io.k8s.api.autoscaling.v2.MetricTarget + default: {} +- name: io.k8s.api.autoscaling.v2.ContainerResourceMetricStatus map: fields: - name: container type: scalar: string default: "" - - name: currentAverageUtilization - type: - scalar: numeric - - name: currentAverageValue + - name: current type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + namedType: io.k8s.api.autoscaling.v2.MetricValueStatus default: {} - name: name type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference +- name: io.k8s.api.autoscaling.v2.CrossVersionObjectReference map: fields: - name: apiVersion @@ -2249,40 +2478,59 @@ types: type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta1.ExternalMetricSource +- name: io.k8s.api.autoscaling.v2.ExternalMetricSource map: fields: - - name: metricName - type: - scalar: string - default: "" - - name: metricSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: targetAverageValue + - name: metric type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: targetValue + namedType: io.k8s.api.autoscaling.v2.MetricIdentifier + default: {} + - name: target type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2beta1.ExternalMetricStatus + namedType: io.k8s.api.autoscaling.v2.MetricTarget + default: {} +- name: io.k8s.api.autoscaling.v2.ExternalMetricStatus map: fields: - - name: currentAverageValue + - name: current type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: currentValue + namedType: io.k8s.api.autoscaling.v2.MetricValueStatus + default: {} + - name: metric type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + namedType: io.k8s.api.autoscaling.v2.MetricIdentifier default: {} - - name: metricName +- name: io.k8s.api.autoscaling.v2.HPAScalingPolicy + map: + fields: + - name: periodSeconds + type: + scalar: numeric + default: 0 + - name: type type: scalar: string default: "" - - name: metricSelector + - name: value type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler + scalar: numeric + default: 0 +- name: io.k8s.api.autoscaling.v2.HPAScalingRules + map: + fields: + - name: policies + type: + list: + elementType: + namedType: io.k8s.api.autoscaling.v2.HPAScalingPolicy + elementRelationship: atomic + - name: selectPolicy + type: + scalar: string + - name: stabilizationWindowSeconds + type: + scalar: numeric +- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscaler map: fields: - name: apiVersion @@ -2297,13 +2545,22 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec + namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerSpec default: {} - name: status type: - namedType: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus + namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerStatus default: {} -- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition +- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerBehavior + map: + fields: + - name: scaleDown + type: + namedType: io.k8s.api.autoscaling.v2.HPAScalingRules + - name: scaleUp + type: + namedType: io.k8s.api.autoscaling.v2.HPAScalingRules +- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerCondition map: fields: - name: lastTransitionTime @@ -2324,9 +2581,12 @@ types: type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec +- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerSpec map: fields: + - name: behavior + type: + namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerBehavior - name: maxReplicas type: scalar: numeric @@ -2335,34 +2595,35 @@ types: type: list: elementType: - namedType: io.k8s.api.autoscaling.v2beta1.MetricSpec + namedType: io.k8s.api.autoscaling.v2.MetricSpec elementRelationship: atomic - name: minReplicas type: scalar: numeric - name: scaleTargetRef type: - namedType: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference + namedType: io.k8s.api.autoscaling.v2.CrossVersionObjectReference default: {} -- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus +- name: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerStatus map: fields: - name: conditions type: list: elementType: - namedType: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition - elementRelationship: atomic + namedType: io.k8s.api.autoscaling.v2.HorizontalPodAutoscalerCondition + elementRelationship: associative + keys: + - type - name: currentMetrics type: list: elementType: - namedType: io.k8s.api.autoscaling.v2beta1.MetricStatus + namedType: io.k8s.api.autoscaling.v2.MetricStatus elementRelationship: atomic - name: currentReplicas type: scalar: numeric - default: 0 - name: desiredReplicas type: scalar: numeric @@ -2373,148 +2634,163 @@ types: - name: observedGeneration type: scalar: numeric -- name: io.k8s.api.autoscaling.v2beta1.MetricSpec +- name: io.k8s.api.autoscaling.v2.MetricIdentifier + map: + fields: + - name: name + type: + scalar: string + default: "" + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector +- name: io.k8s.api.autoscaling.v2.MetricSpec map: fields: - name: containerResource type: - namedType: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource + namedType: io.k8s.api.autoscaling.v2.ContainerResourceMetricSource - name: external type: - namedType: io.k8s.api.autoscaling.v2beta1.ExternalMetricSource + namedType: io.k8s.api.autoscaling.v2.ExternalMetricSource - name: object type: - namedType: io.k8s.api.autoscaling.v2beta1.ObjectMetricSource + namedType: io.k8s.api.autoscaling.v2.ObjectMetricSource - name: pods type: - namedType: io.k8s.api.autoscaling.v2beta1.PodsMetricSource + namedType: io.k8s.api.autoscaling.v2.PodsMetricSource - name: resource type: - namedType: io.k8s.api.autoscaling.v2beta1.ResourceMetricSource + namedType: io.k8s.api.autoscaling.v2.ResourceMetricSource - name: type type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta1.MetricStatus +- name: io.k8s.api.autoscaling.v2.MetricStatus map: fields: - name: containerResource type: - namedType: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricStatus + namedType: io.k8s.api.autoscaling.v2.ContainerResourceMetricStatus - name: external type: - namedType: io.k8s.api.autoscaling.v2beta1.ExternalMetricStatus + namedType: io.k8s.api.autoscaling.v2.ExternalMetricStatus - name: object type: - namedType: io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus + namedType: io.k8s.api.autoscaling.v2.ObjectMetricStatus - name: pods type: - namedType: io.k8s.api.autoscaling.v2beta1.PodsMetricStatus + namedType: io.k8s.api.autoscaling.v2.PodsMetricStatus - name: resource type: - namedType: io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus + namedType: io.k8s.api.autoscaling.v2.ResourceMetricStatus - name: type type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta1.ObjectMetricSource +- name: io.k8s.api.autoscaling.v2.MetricTarget map: fields: + - name: averageUtilization + type: + scalar: numeric - name: averageValue type: namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: metricName + - name: type type: scalar: string default: "" - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: target - type: - namedType: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference - default: {} - - name: targetValue + - name: value type: namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - default: {} -- name: io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus +- name: io.k8s.api.autoscaling.v2.MetricValueStatus map: fields: + - name: averageUtilization + type: + scalar: numeric - name: averageValue type: namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: currentValue + - name: value type: namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - default: {} - - name: metricName +- name: io.k8s.api.autoscaling.v2.ObjectMetricSource + map: + fields: + - name: describedObject type: - scalar: string - default: "" - - name: selector + namedType: io.k8s.api.autoscaling.v2.CrossVersionObjectReference + default: {} + - name: metric type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + namedType: io.k8s.api.autoscaling.v2.MetricIdentifier + default: {} - name: target type: - namedType: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference + namedType: io.k8s.api.autoscaling.v2.MetricTarget default: {} -- name: io.k8s.api.autoscaling.v2beta1.PodsMetricSource +- name: io.k8s.api.autoscaling.v2.ObjectMetricStatus map: fields: - - name: metricName + - name: current type: - scalar: string - default: "" - - name: selector + namedType: io.k8s.api.autoscaling.v2.MetricValueStatus + default: {} + - name: describedObject type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: targetAverageValue + namedType: io.k8s.api.autoscaling.v2.CrossVersionObjectReference + default: {} + - name: metric type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + namedType: io.k8s.api.autoscaling.v2.MetricIdentifier default: {} -- name: io.k8s.api.autoscaling.v2beta1.PodsMetricStatus +- name: io.k8s.api.autoscaling.v2.PodsMetricSource map: fields: - - name: currentAverageValue + - name: metric type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + namedType: io.k8s.api.autoscaling.v2.MetricIdentifier default: {} - - name: metricName + - name: target type: - scalar: string - default: "" - - name: selector + namedType: io.k8s.api.autoscaling.v2.MetricTarget + default: {} +- name: io.k8s.api.autoscaling.v2.PodsMetricStatus + map: + fields: + - name: current type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: io.k8s.api.autoscaling.v2beta1.ResourceMetricSource + namedType: io.k8s.api.autoscaling.v2.MetricValueStatus + default: {} + - name: metric + type: + namedType: io.k8s.api.autoscaling.v2.MetricIdentifier + default: {} +- name: io.k8s.api.autoscaling.v2.ResourceMetricSource map: fields: - name: name type: scalar: string default: "" - - name: targetAverageUtilization - type: - scalar: numeric - - name: targetAverageValue + - name: target type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus + namedType: io.k8s.api.autoscaling.v2.MetricTarget + default: {} +- name: io.k8s.api.autoscaling.v2.ResourceMetricStatus map: fields: - - name: currentAverageUtilization - type: - scalar: numeric - - name: currentAverageValue + - name: current type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + namedType: io.k8s.api.autoscaling.v2.MetricValueStatus default: {} - name: name type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricSource +- name: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource map: fields: - name: container @@ -2525,26 +2801,31 @@ types: type: scalar: string default: "" - - name: target + - name: targetAverageUtilization type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricStatus + scalar: numeric + - name: targetAverageValue + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity +- name: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricStatus map: fields: - name: container type: scalar: string default: "" - - name: current + - name: currentAverageUtilization type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus + scalar: numeric + - name: currentAverageValue + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity default: {} - name: name type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference +- name: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference map: fields: - name: apiVersion @@ -2558,59 +2839,40 @@ types: type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta2.ExternalMetricSource +- name: io.k8s.api.autoscaling.v2beta1.ExternalMetricSource map: fields: - - name: metric + - name: metricName type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier - default: {} - - name: target + scalar: string + default: "" + - name: metricSelector type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2beta2.ExternalMetricStatus - map: - fields: - - name: current + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: targetAverageValue type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus - default: {} - - name: metric + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + - name: targetValue type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier - default: {} -- name: io.k8s.api.autoscaling.v2beta2.HPAScalingPolicy + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity +- name: io.k8s.api.autoscaling.v2beta1.ExternalMetricStatus map: fields: - - name: periodSeconds - type: - scalar: numeric - default: 0 - - name: type - type: - scalar: string - default: "" - - name: value + - name: currentAverageValue type: - scalar: numeric - default: 0 -- name: io.k8s.api.autoscaling.v2beta2.HPAScalingRules - map: - fields: - - name: policies + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + - name: currentValue type: - list: - elementType: - namedType: io.k8s.api.autoscaling.v2beta2.HPAScalingPolicy - elementRelationship: atomic - - name: selectPolicy + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + default: {} + - name: metricName type: scalar: string - - name: stabilizationWindowSeconds + default: "" + - name: metricSelector type: - scalar: numeric -- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector +- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscaler map: fields: - name: apiVersion @@ -2625,22 +2887,13 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec + namedType: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec default: {} - name: status type: - namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus + namedType: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus default: {} -- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior - map: - fields: - - name: scaleDown - type: - namedType: io.k8s.api.autoscaling.v2beta2.HPAScalingRules - - name: scaleUp - type: - namedType: io.k8s.api.autoscaling.v2beta2.HPAScalingRules -- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition +- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition map: fields: - name: lastTransitionTime @@ -2661,12 +2914,9 @@ types: type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec +- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerSpec map: fields: - - name: behavior - type: - namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior - name: maxReplicas type: scalar: numeric @@ -2675,29 +2925,29 @@ types: type: list: elementType: - namedType: io.k8s.api.autoscaling.v2beta2.MetricSpec + namedType: io.k8s.api.autoscaling.v2beta1.MetricSpec elementRelationship: atomic - name: minReplicas type: scalar: numeric - name: scaleTargetRef type: - namedType: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference + namedType: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference default: {} -- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus +- name: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerStatus map: fields: - name: conditions type: list: elementType: - namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition + namedType: io.k8s.api.autoscaling.v2beta1.HorizontalPodAutoscalerCondition elementRelationship: atomic - name: currentMetrics type: list: elementType: - namedType: io.k8s.api.autoscaling.v2beta2.MetricStatus + namedType: io.k8s.api.autoscaling.v2beta1.MetricStatus elementRelationship: atomic - name: currentReplicas type: @@ -2713,143 +2963,154 @@ types: - name: observedGeneration type: scalar: numeric -- name: io.k8s.api.autoscaling.v2beta2.MetricIdentifier - map: - fields: - - name: name - type: - scalar: string - default: "" - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: io.k8s.api.autoscaling.v2beta2.MetricSpec +- name: io.k8s.api.autoscaling.v2beta1.MetricSpec map: fields: - name: containerResource type: - namedType: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricSource + namedType: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricSource - name: external type: - namedType: io.k8s.api.autoscaling.v2beta2.ExternalMetricSource + namedType: io.k8s.api.autoscaling.v2beta1.ExternalMetricSource - name: object type: - namedType: io.k8s.api.autoscaling.v2beta2.ObjectMetricSource + namedType: io.k8s.api.autoscaling.v2beta1.ObjectMetricSource - name: pods type: - namedType: io.k8s.api.autoscaling.v2beta2.PodsMetricSource + namedType: io.k8s.api.autoscaling.v2beta1.PodsMetricSource - name: resource type: - namedType: io.k8s.api.autoscaling.v2beta2.ResourceMetricSource + namedType: io.k8s.api.autoscaling.v2beta1.ResourceMetricSource - name: type type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta2.MetricStatus +- name: io.k8s.api.autoscaling.v2beta1.MetricStatus map: fields: - name: containerResource type: - namedType: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricStatus + namedType: io.k8s.api.autoscaling.v2beta1.ContainerResourceMetricStatus - name: external type: - namedType: io.k8s.api.autoscaling.v2beta2.ExternalMetricStatus + namedType: io.k8s.api.autoscaling.v2beta1.ExternalMetricStatus - name: object type: - namedType: io.k8s.api.autoscaling.v2beta2.ObjectMetricStatus + namedType: io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus - name: pods type: - namedType: io.k8s.api.autoscaling.v2beta2.PodsMetricStatus + namedType: io.k8s.api.autoscaling.v2beta1.PodsMetricStatus - name: resource type: - namedType: io.k8s.api.autoscaling.v2beta2.ResourceMetricStatus + namedType: io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus - name: type type: scalar: string default: "" -- name: io.k8s.api.autoscaling.v2beta2.MetricTarget +- name: io.k8s.api.autoscaling.v2beta1.ObjectMetricSource map: fields: - - name: averageUtilization - type: - scalar: numeric - name: averageValue type: namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: type + - name: metricName type: scalar: string default: "" - - name: value + - name: selector type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2beta2.MetricValueStatus - map: - fields: - - name: averageUtilization + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: target type: - scalar: numeric - - name: averageValue - type: - namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - - name: value + namedType: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference + default: {} + - name: targetValue type: namedType: io.k8s.apimachinery.pkg.api.resource.Quantity -- name: io.k8s.api.autoscaling.v2beta2.ObjectMetricSource + default: {} +- name: io.k8s.api.autoscaling.v2beta1.ObjectMetricStatus map: fields: - - name: describedObject + - name: averageValue type: - namedType: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference - default: {} - - name: metric + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + - name: currentValue type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity default: {} + - name: metricName + type: + scalar: string + default: "" + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - name: target type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget + namedType: io.k8s.api.autoscaling.v2beta1.CrossVersionObjectReference default: {} -- name: io.k8s.api.autoscaling.v2beta2.ObjectMetricStatus +- name: io.k8s.api.autoscaling.v2beta1.PodsMetricSource map: fields: - - name: current + - name: metricName type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus - default: {} - - name: describedObject + scalar: string + default: "" + - name: selector type: - namedType: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference - default: {} - - name: metric + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: targetAverageValue type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity default: {} -- name: io.k8s.api.autoscaling.v2beta2.PodsMetricSource +- name: io.k8s.api.autoscaling.v2beta1.PodsMetricStatus map: fields: - - name: metric + - name: currentAverageValue type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity default: {} - - name: target + - name: metricName type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget - default: {} -- name: io.k8s.api.autoscaling.v2beta2.PodsMetricStatus + scalar: string + default: "" + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector +- name: io.k8s.api.autoscaling.v2beta1.ResourceMetricSource map: fields: - - name: current + - name: name type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus - default: {} - - name: metric + scalar: string + default: "" + - name: targetAverageUtilization type: - namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + scalar: numeric + - name: targetAverageValue + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity +- name: io.k8s.api.autoscaling.v2beta1.ResourceMetricStatus + map: + fields: + - name: currentAverageUtilization + type: + scalar: numeric + - name: currentAverageValue + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity default: {} -- name: io.k8s.api.autoscaling.v2beta2.ResourceMetricSource + - name: name + type: + scalar: string + default: "" +- name: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricSource map: fields: + - name: container + type: + scalar: string + default: "" - name: name type: scalar: string @@ -2858,9 +3119,13 @@ types: type: namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget default: {} -- name: io.k8s.api.autoscaling.v2beta2.ResourceMetricStatus +- name: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricStatus map: fields: + - name: container + type: + scalar: string + default: "" - name: current type: namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus @@ -2869,7 +3134,7 @@ types: type: scalar: string default: "" -- name: io.k8s.api.batch.v1.CronJob +- name: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference map: fields: - name: apiVersion @@ -2878,63 +3143,64 @@ types: - name: kind type: scalar: string - - name: metadata + default: "" + - name: name type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec + scalar: string + default: "" +- name: io.k8s.api.autoscaling.v2beta2.ExternalMetricSource + map: + fields: + - name: metric type: - namedType: io.k8s.api.batch.v1.CronJobSpec + namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier default: {} - - name: status + - name: target type: - namedType: io.k8s.api.batch.v1.CronJobStatus + namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget default: {} -- name: io.k8s.api.batch.v1.CronJobSpec +- name: io.k8s.api.autoscaling.v2beta2.ExternalMetricStatus map: fields: - - name: concurrencyPolicy - type: - scalar: string - - name: failedJobsHistoryLimit + - name: current type: - scalar: numeric - - name: jobTemplate + namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus + default: {} + - name: metric type: - namedType: io.k8s.api.batch.v1.JobTemplateSpec + namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier default: {} - - name: schedule +- name: io.k8s.api.autoscaling.v2beta2.HPAScalingPolicy + map: + fields: + - name: periodSeconds + type: + scalar: numeric + default: 0 + - name: type type: scalar: string default: "" - - name: startingDeadlineSeconds - type: - scalar: numeric - - name: successfulJobsHistoryLimit + - name: value type: scalar: numeric - - name: suspend - type: - scalar: boolean - - name: timeZone - type: - scalar: string -- name: io.k8s.api.batch.v1.CronJobStatus + default: 0 +- name: io.k8s.api.autoscaling.v2beta2.HPAScalingRules map: fields: - - name: active + - name: policies type: list: elementType: - namedType: io.k8s.api.core.v1.ObjectReference + namedType: io.k8s.api.autoscaling.v2beta2.HPAScalingPolicy elementRelationship: atomic - - name: lastScheduleTime + - name: selectPolicy type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: lastSuccessfulTime + scalar: string + - name: stabilizationWindowSeconds type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: io.k8s.api.batch.v1.Job + scalar: numeric +- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscaler map: fields: - name: apiVersion @@ -2949,19 +3215,24 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.batch.v1.JobSpec + namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec default: {} - name: status type: - namedType: io.k8s.api.batch.v1.JobStatus + namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus default: {} -- name: io.k8s.api.batch.v1.JobCondition +- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior map: fields: - - name: lastProbeTime + - name: scaleDown type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - default: {} + namedType: io.k8s.api.autoscaling.v2beta2.HPAScalingRules + - name: scaleUp + type: + namedType: io.k8s.api.autoscaling.v2beta2.HPAScalingRules +- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition + map: + fields: - name: lastTransitionTime type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time @@ -2980,155 +3251,215 @@ types: type: scalar: string default: "" -- name: io.k8s.api.batch.v1.JobSpec +- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerSpec map: fields: - - name: activeDeadlineSeconds - type: - scalar: numeric - - name: backoffLimit - type: - scalar: numeric - - name: completionMode + - name: behavior type: - scalar: string - - name: completions + namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerBehavior + - name: maxReplicas type: scalar: numeric - - name: manualSelector + default: 0 + - name: metrics type: - scalar: boolean - - name: parallelism + list: + elementType: + namedType: io.k8s.api.autoscaling.v2beta2.MetricSpec + elementRelationship: atomic + - name: minReplicas type: scalar: numeric - - name: podFailurePolicy - type: - namedType: io.k8s.api.batch.v1.PodFailurePolicy - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: suspend - type: - scalar: boolean - - name: template + - name: scaleTargetRef type: - namedType: io.k8s.api.core.v1.PodTemplateSpec + namedType: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference default: {} - - name: ttlSecondsAfterFinished - type: - scalar: numeric -- name: io.k8s.api.batch.v1.JobStatus +- name: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerStatus map: fields: - - name: active - type: - scalar: numeric - - name: completedIndexes - type: - scalar: string - - name: completionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - name: conditions type: list: elementType: - namedType: io.k8s.api.batch.v1.JobCondition + namedType: io.k8s.api.autoscaling.v2beta2.HorizontalPodAutoscalerCondition elementRelationship: atomic - - name: failed + - name: currentMetrics + type: + list: + elementType: + namedType: io.k8s.api.autoscaling.v2beta2.MetricStatus + elementRelationship: atomic + - name: currentReplicas type: scalar: numeric - - name: ready + default: 0 + - name: desiredReplicas type: scalar: numeric - - name: startTime + default: 0 + - name: lastScaleTime type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: succeeded + - name: observedGeneration type: scalar: numeric - - name: uncountedTerminatedPods - type: - namedType: io.k8s.api.batch.v1.UncountedTerminatedPods -- name: io.k8s.api.batch.v1.JobTemplateSpec +- name: io.k8s.api.autoscaling.v2beta2.MetricIdentifier map: fields: - - name: metadata + - name: name type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec + scalar: string + default: "" + - name: selector type: - namedType: io.k8s.api.batch.v1.JobSpec - default: {} -- name: io.k8s.api.batch.v1.PodFailurePolicy + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector +- name: io.k8s.api.autoscaling.v2beta2.MetricSpec map: fields: - - name: rules + - name: containerResource type: - list: - elementType: - namedType: io.k8s.api.batch.v1.PodFailurePolicyRule - elementRelationship: atomic -- name: io.k8s.api.batch.v1.PodFailurePolicyOnExitCodesRequirement - map: - fields: - - name: containerName + namedType: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricSource + - name: external type: - scalar: string - - name: operator + namedType: io.k8s.api.autoscaling.v2beta2.ExternalMetricSource + - name: object + type: + namedType: io.k8s.api.autoscaling.v2beta2.ObjectMetricSource + - name: pods + type: + namedType: io.k8s.api.autoscaling.v2beta2.PodsMetricSource + - name: resource + type: + namedType: io.k8s.api.autoscaling.v2beta2.ResourceMetricSource + - name: type type: scalar: string default: "" - - name: values - type: - list: - elementType: - scalar: numeric - elementRelationship: associative -- name: io.k8s.api.batch.v1.PodFailurePolicyOnPodConditionsPattern +- name: io.k8s.api.autoscaling.v2beta2.MetricStatus map: fields: - - name: status + - name: containerResource + type: + namedType: io.k8s.api.autoscaling.v2beta2.ContainerResourceMetricStatus + - name: external + type: + namedType: io.k8s.api.autoscaling.v2beta2.ExternalMetricStatus + - name: object + type: + namedType: io.k8s.api.autoscaling.v2beta2.ObjectMetricStatus + - name: pods + type: + namedType: io.k8s.api.autoscaling.v2beta2.PodsMetricStatus + - name: resource + type: + namedType: io.k8s.api.autoscaling.v2beta2.ResourceMetricStatus + - name: type type: scalar: string default: "" +- name: io.k8s.api.autoscaling.v2beta2.MetricTarget + map: + fields: + - name: averageUtilization + type: + scalar: numeric + - name: averageValue + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - name: type type: scalar: string default: "" -- name: io.k8s.api.batch.v1.PodFailurePolicyRule + - name: value + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity +- name: io.k8s.api.autoscaling.v2beta2.MetricValueStatus map: fields: - - name: action + - name: averageUtilization + type: + scalar: numeric + - name: averageValue + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + - name: value + type: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity +- name: io.k8s.api.autoscaling.v2beta2.ObjectMetricSource + map: + fields: + - name: describedObject + type: + namedType: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference + default: {} + - name: metric + type: + namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + default: {} + - name: target + type: + namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget + default: {} +- name: io.k8s.api.autoscaling.v2beta2.ObjectMetricStatus + map: + fields: + - name: current + type: + namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus + default: {} + - name: describedObject + type: + namedType: io.k8s.api.autoscaling.v2beta2.CrossVersionObjectReference + default: {} + - name: metric + type: + namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + default: {} +- name: io.k8s.api.autoscaling.v2beta2.PodsMetricSource + map: + fields: + - name: metric + type: + namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + default: {} + - name: target + type: + namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget + default: {} +- name: io.k8s.api.autoscaling.v2beta2.PodsMetricStatus + map: + fields: + - name: current + type: + namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus + default: {} + - name: metric + type: + namedType: io.k8s.api.autoscaling.v2beta2.MetricIdentifier + default: {} +- name: io.k8s.api.autoscaling.v2beta2.ResourceMetricSource + map: + fields: + - name: name type: scalar: string default: "" - - name: onExitCodes - type: - namedType: io.k8s.api.batch.v1.PodFailurePolicyOnExitCodesRequirement - - name: onPodConditions + - name: target type: - list: - elementType: - namedType: io.k8s.api.batch.v1.PodFailurePolicyOnPodConditionsPattern - elementRelationship: atomic -- name: io.k8s.api.batch.v1.UncountedTerminatedPods + namedType: io.k8s.api.autoscaling.v2beta2.MetricTarget + default: {} +- name: io.k8s.api.autoscaling.v2beta2.ResourceMetricStatus map: fields: - - name: failed + - name: current type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: succeeded + namedType: io.k8s.api.autoscaling.v2beta2.MetricValueStatus + default: {} + - name: name type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.batch.v1beta1.CronJob + scalar: string + default: "" +- name: io.k8s.api.batch.v1.CronJob map: fields: - name: apiVersion @@ -3143,13 +3474,13 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.batch.v1beta1.CronJobSpec + namedType: io.k8s.api.batch.v1.CronJobSpec default: {} - name: status type: - namedType: io.k8s.api.batch.v1beta1.CronJobStatus + namedType: io.k8s.api.batch.v1.CronJobStatus default: {} -- name: io.k8s.api.batch.v1beta1.CronJobSpec +- name: io.k8s.api.batch.v1.CronJobSpec map: fields: - name: concurrencyPolicy @@ -3160,7 +3491,7 @@ types: scalar: numeric - name: jobTemplate type: - namedType: io.k8s.api.batch.v1beta1.JobTemplateSpec + namedType: io.k8s.api.batch.v1.JobTemplateSpec default: {} - name: schedule type: @@ -3178,7 +3509,7 @@ types: - name: timeZone type: scalar: string -- name: io.k8s.api.batch.v1beta1.CronJobStatus +- name: io.k8s.api.batch.v1.CronJobStatus map: fields: - name: active @@ -3193,18 +3524,7 @@ types: - name: lastSuccessfulTime type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time -- name: io.k8s.api.batch.v1beta1.JobTemplateSpec - map: - fields: - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.batch.v1.JobSpec - default: {} -- name: io.k8s.api.certificates.v1.CertificateSigningRequest +- name: io.k8s.api.batch.v1.Job map: fields: - name: apiVersion @@ -3219,20 +3539,20 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.certificates.v1.CertificateSigningRequestSpec + namedType: io.k8s.api.batch.v1.JobSpec default: {} - name: status type: - namedType: io.k8s.api.certificates.v1.CertificateSigningRequestStatus + namedType: io.k8s.api.batch.v1.JobStatus default: {} -- name: io.k8s.api.certificates.v1.CertificateSigningRequestCondition +- name: io.k8s.api.batch.v1.JobCondition map: fields: - - name: lastTransitionTime + - name: lastProbeTime type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time default: {} - - name: lastUpdateTime + - name: lastTransitionTime type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time default: {} @@ -3250,60 +3570,170 @@ types: type: scalar: string default: "" -- name: io.k8s.api.certificates.v1.CertificateSigningRequestSpec +- name: io.k8s.api.batch.v1.JobSpec map: fields: - - name: expirationSeconds + - name: activeDeadlineSeconds type: scalar: numeric - - name: extra + - name: backoffLimit type: - map: - elementType: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: groups + scalar: numeric + - name: backoffLimitPerIndex type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: request + scalar: numeric + - name: completionMode type: scalar: string - - name: signerName + - name: completions type: - scalar: string - default: "" - - name: uid + scalar: numeric + - name: manualSelector type: - scalar: string - - name: usages + scalar: boolean + - name: maxFailedIndexes type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: username + scalar: numeric + - name: parallelism + type: + scalar: numeric + - name: podFailurePolicy + type: + namedType: io.k8s.api.batch.v1.PodFailurePolicy + - name: podReplacementPolicy type: scalar: string -- name: io.k8s.api.certificates.v1.CertificateSigningRequestStatus + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: suspend + type: + scalar: boolean + - name: template + type: + namedType: io.k8s.api.core.v1.PodTemplateSpec + default: {} + - name: ttlSecondsAfterFinished + type: + scalar: numeric +- name: io.k8s.api.batch.v1.JobStatus map: fields: - - name: certificate + - name: active + type: + scalar: numeric + - name: completedIndexes type: scalar: string + - name: completionTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - name: conditions type: list: elementType: - namedType: io.k8s.api.certificates.v1.CertificateSigningRequestCondition + namedType: io.k8s.api.batch.v1.JobCondition + elementRelationship: atomic + - name: failed + type: + scalar: numeric + - name: failedIndexes + type: + scalar: string + - name: ready + type: + scalar: numeric + - name: startTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + - name: succeeded + type: + scalar: numeric + - name: terminating + type: + scalar: numeric + - name: uncountedTerminatedPods + type: + namedType: io.k8s.api.batch.v1.UncountedTerminatedPods +- name: io.k8s.api.batch.v1.JobTemplateSpec + map: + fields: + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.batch.v1.JobSpec + default: {} +- name: io.k8s.api.batch.v1.PodFailurePolicy + map: + fields: + - name: rules + type: + list: + elementType: + namedType: io.k8s.api.batch.v1.PodFailurePolicyRule + elementRelationship: atomic +- name: io.k8s.api.batch.v1.PodFailurePolicyOnExitCodesRequirement + map: + fields: + - name: containerName + type: + scalar: string + - name: operator + type: + scalar: string + default: "" + - name: values + type: + list: + elementType: + scalar: numeric elementRelationship: associative - keys: - - type -- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequest +- name: io.k8s.api.batch.v1.PodFailurePolicyOnPodConditionsPattern + map: + fields: + - name: status + type: + scalar: string + default: "" + - name: type + type: + scalar: string + default: "" +- name: io.k8s.api.batch.v1.PodFailurePolicyRule + map: + fields: + - name: action + type: + scalar: string + default: "" + - name: onExitCodes + type: + namedType: io.k8s.api.batch.v1.PodFailurePolicyOnExitCodesRequirement + - name: onPodConditions + type: + list: + elementType: + namedType: io.k8s.api.batch.v1.PodFailurePolicyOnPodConditionsPattern + elementRelationship: atomic +- name: io.k8s.api.batch.v1.UncountedTerminatedPods + map: + fields: + - name: failed + type: + list: + elementType: + scalar: string + elementRelationship: associative + - name: succeeded + type: + list: + elementType: + scalar: string + elementRelationship: associative +- name: io.k8s.api.batch.v1beta1.CronJob map: fields: - name: apiVersion @@ -3318,13 +3748,89 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.certificates.v1beta1.CertificateSigningRequestSpec + namedType: io.k8s.api.batch.v1beta1.CronJobSpec default: {} - name: status type: - namedType: io.k8s.api.certificates.v1beta1.CertificateSigningRequestStatus + namedType: io.k8s.api.batch.v1beta1.CronJobStatus default: {} -- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequestCondition +- name: io.k8s.api.batch.v1beta1.CronJobSpec + map: + fields: + - name: concurrencyPolicy + type: + scalar: string + - name: failedJobsHistoryLimit + type: + scalar: numeric + - name: jobTemplate + type: + namedType: io.k8s.api.batch.v1beta1.JobTemplateSpec + default: {} + - name: schedule + type: + scalar: string + default: "" + - name: startingDeadlineSeconds + type: + scalar: numeric + - name: successfulJobsHistoryLimit + type: + scalar: numeric + - name: suspend + type: + scalar: boolean + - name: timeZone + type: + scalar: string +- name: io.k8s.api.batch.v1beta1.CronJobStatus + map: + fields: + - name: active + type: + list: + elementType: + namedType: io.k8s.api.core.v1.ObjectReference + elementRelationship: atomic + - name: lastScheduleTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + - name: lastSuccessfulTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time +- name: io.k8s.api.batch.v1beta1.JobTemplateSpec + map: + fields: + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.batch.v1.JobSpec + default: {} +- name: io.k8s.api.certificates.v1.CertificateSigningRequest + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.certificates.v1.CertificateSigningRequestSpec + default: {} + - name: status + type: + namedType: io.k8s.api.certificates.v1.CertificateSigningRequestStatus + default: {} +- name: io.k8s.api.certificates.v1.CertificateSigningRequestCondition map: fields: - name: lastTransitionTime @@ -3349,7 +3855,7 @@ types: type: scalar: string default: "" -- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequestSpec +- name: io.k8s.api.certificates.v1.CertificateSigningRequestSpec map: fields: - name: expirationSeconds @@ -3375,6 +3881,7 @@ types: - name: signerName type: scalar: string + default: "" - name: uid type: scalar: string @@ -3387,7 +3894,7 @@ types: - name: username type: scalar: string -- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequestStatus +- name: io.k8s.api.certificates.v1.CertificateSigningRequestStatus map: fields: - name: certificate @@ -3397,11 +3904,11 @@ types: type: list: elementType: - namedType: io.k8s.api.certificates.v1beta1.CertificateSigningRequestCondition + namedType: io.k8s.api.certificates.v1.CertificateSigningRequestCondition elementRelationship: associative keys: - type -- name: io.k8s.api.coordination.v1.Lease +- name: io.k8s.api.certificates.v1alpha1.ClusterTrustBundle map: fields: - name: apiVersion @@ -3416,27 +3923,19 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.coordination.v1.LeaseSpec + namedType: io.k8s.api.certificates.v1alpha1.ClusterTrustBundleSpec default: {} -- name: io.k8s.api.coordination.v1.LeaseSpec +- name: io.k8s.api.certificates.v1alpha1.ClusterTrustBundleSpec map: fields: - - name: acquireTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime - - name: holderIdentity + - name: signerName type: scalar: string - - name: leaseDurationSeconds + - name: trustBundle type: - scalar: numeric - - name: leaseTransitions - type: - scalar: numeric - - name: renewTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime -- name: io.k8s.api.coordination.v1beta1.Lease + scalar: string + default: "" +- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequest map: fields: - name: apiVersion @@ -3451,18 +3950,151 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.coordination.v1beta1.LeaseSpec + namedType: io.k8s.api.certificates.v1beta1.CertificateSigningRequestSpec default: {} -- name: io.k8s.api.coordination.v1beta1.LeaseSpec + - name: status + type: + namedType: io.k8s.api.certificates.v1beta1.CertificateSigningRequestStatus + default: {} +- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequestCondition map: fields: - - name: acquireTime + - name: lastTransitionTime type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime - - name: holderIdentity + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + default: {} + - name: lastUpdateTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + default: {} + - name: message type: scalar: string - - name: leaseDurationSeconds + - name: reason + type: + scalar: string + - name: status + type: + scalar: string + default: "" + - name: type + type: + scalar: string + default: "" +- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequestSpec + map: + fields: + - name: expirationSeconds + type: + scalar: numeric + - name: extra + type: + map: + elementType: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: groups + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: request + type: + scalar: string + - name: signerName + type: + scalar: string + - name: uid + type: + scalar: string + - name: usages + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: username + type: + scalar: string +- name: io.k8s.api.certificates.v1beta1.CertificateSigningRequestStatus + map: + fields: + - name: certificate + type: + scalar: string + - name: conditions + type: + list: + elementType: + namedType: io.k8s.api.certificates.v1beta1.CertificateSigningRequestCondition + elementRelationship: associative + keys: + - type +- name: io.k8s.api.coordination.v1.Lease + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.coordination.v1.LeaseSpec + default: {} +- name: io.k8s.api.coordination.v1.LeaseSpec + map: + fields: + - name: acquireTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime + - name: holderIdentity + type: + scalar: string + - name: leaseDurationSeconds + type: + scalar: numeric + - name: leaseTransitions + type: + scalar: numeric + - name: renewTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime +- name: io.k8s.api.coordination.v1beta1.Lease + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.coordination.v1beta1.LeaseSpec + default: {} +- name: io.k8s.api.coordination.v1beta1.LeaseSpec + map: + fields: + - name: acquireTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime + - name: holderIdentity + type: + scalar: string + - name: leaseDurationSeconds type: scalar: numeric - name: leaseTransitions @@ -3717,6 +4349,15 @@ types: type: scalar: string default: "" +- name: io.k8s.api.core.v1.ClaimSource + map: + fields: + - name: resourceClaimName + type: + scalar: string + - name: resourceClaimTemplateName + type: + scalar: string - name: io.k8s.api.core.v1.ClientIPConfig map: fields: @@ -3921,10 +4562,19 @@ types: - name: readinessProbe type: namedType: io.k8s.api.core.v1.Probe + - name: resizePolicy + type: + list: + elementType: + namedType: io.k8s.api.core.v1.ContainerResizePolicy + elementRelationship: atomic - name: resources type: namedType: io.k8s.api.core.v1.ResourceRequirements default: {} + - name: restartPolicy + type: + scalar: string - name: securityContext type: namedType: io.k8s.api.core.v1.SecurityContext @@ -3997,6 +4647,17 @@ types: type: scalar: string default: TCP +- name: io.k8s.api.core.v1.ContainerResizePolicy + map: + fields: + - name: resourceName + type: + scalar: string + default: "" + - name: restartPolicy + type: + scalar: string + default: "" - name: io.k8s.api.core.v1.ContainerState map: fields: @@ -4055,6 +4716,11 @@ types: - name: io.k8s.api.core.v1.ContainerStatus map: fields: + - name: allocatedResources + type: + map: + elementType: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - name: containerID type: scalar: string @@ -4078,6 +4744,9 @@ types: type: scalar: boolean default: false + - name: resources + type: + namedType: io.k8s.api.core.v1.ResourceRequirements - name: restartCount type: scalar: numeric @@ -4313,10 +4982,19 @@ types: - name: readinessProbe type: namedType: io.k8s.api.core.v1.Probe + - name: resizePolicy + type: + list: + elementType: + namedType: io.k8s.api.core.v1.ContainerResizePolicy + elementRelationship: atomic - name: resources type: namedType: io.k8s.api.core.v1.ResourceRequirements default: {} + - name: restartPolicy + type: + scalar: string - name: securityContext type: namedType: io.k8s.api.core.v1.SecurityContext @@ -4647,6 +5325,12 @@ types: - name: ip type: scalar: string +- name: io.k8s.api.core.v1.HostIP + map: + fields: + - name: ip + type: + scalar: string - name: io.k8s.api.core.v1.HostPathVolumeSource map: fields: @@ -4843,6 +5527,9 @@ types: - name: ip type: scalar: string + - name: ipMode + type: + scalar: string - name: ports type: list: @@ -5345,10 +6032,10 @@ types: namedType: io.k8s.api.core.v1.TypedLocalObjectReference - name: dataSourceRef type: - namedType: io.k8s.api.core.v1.TypedLocalObjectReference + namedType: io.k8s.api.core.v1.TypedObjectReference - name: resources type: - namedType: io.k8s.api.core.v1.ResourceRequirements + namedType: io.k8s.api.core.v1.VolumeResourceRequirements default: {} - name: selector type: @@ -5371,6 +6058,12 @@ types: elementType: scalar: string elementRelationship: atomic + - name: allocatedResourceStatuses + type: + map: + elementType: + scalar: string + elementRelationship: separable - name: allocatedResources type: map: @@ -5392,9 +6085,6 @@ types: - name: phase type: scalar: string - - name: resizeStatus - type: - scalar: string - name: io.k8s.api.core.v1.PersistentVolumeClaimTemplate map: fields: @@ -5521,6 +6211,9 @@ types: - name: io.k8s.api.core.v1.PersistentVolumeStatus map: fields: + - name: lastPhaseTransitionTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - name: message type: scalar: string @@ -5685,6 +6378,27 @@ types: type: scalar: string default: "" +- name: io.k8s.api.core.v1.PodResourceClaim + map: + fields: + - name: name + type: + scalar: string + default: "" + - name: source + type: + namedType: io.k8s.api.core.v1.ClaimSource + default: {} +- name: io.k8s.api.core.v1.PodResourceClaimStatus + map: + fields: + - name: name + type: + scalar: string + default: "" + - name: resourceClaimName + type: + scalar: string - name: io.k8s.api.core.v1.PodSchedulingGate map: fields: @@ -5839,6 +6553,14 @@ types: elementType: namedType: io.k8s.api.core.v1.PodReadinessGate elementRelationship: atomic + - name: resourceClaims + type: + list: + elementType: + namedType: io.k8s.api.core.v1.PodResourceClaim + elementRelationship: associative + keys: + - name - name: restartPolicy type: scalar: string @@ -5926,6 +6648,12 @@ types: - name: hostIP type: scalar: string + - name: hostIPs + type: + list: + elementType: + namedType: io.k8s.api.core.v1.HostIP + elementRelationship: atomic - name: initContainerStatuses type: list: @@ -5958,6 +6686,17 @@ types: - name: reason type: scalar: string + - name: resize + type: + scalar: string + - name: resourceClaimStatuses + type: + list: + elementType: + namedType: io.k8s.api.core.v1.PodResourceClaimStatus + elementRelationship: associative + keys: + - name - name: startTime type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time @@ -6244,6 +6983,13 @@ types: type: scalar: numeric default: 0 +- name: io.k8s.api.core.v1.ResourceClaim + map: + fields: + - name: name + type: + scalar: string + default: "" - name: io.k8s.api.core.v1.ResourceFieldSelector map: fields: @@ -6313,6 +7059,14 @@ types: - name: io.k8s.api.core.v1.ResourceRequirements map: fields: + - name: claims + type: + list: + elementType: + namedType: io.k8s.api.core.v1.ResourceClaim + elementRelationship: associative + keys: + - name - name: limits type: map: @@ -6934,6 +7688,23 @@ types: scalar: string default: "" elementRelationship: atomic +- name: io.k8s.api.core.v1.TypedObjectReference + map: + fields: + - name: apiGroup + type: + scalar: string + - name: kind + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + - name: namespace + type: + scalar: string - name: io.k8s.api.core.v1.Volume map: fields: @@ -7083,6 +7854,19 @@ types: - name: serviceAccountToken type: namedType: io.k8s.api.core.v1.ServiceAccountTokenProjection +- name: io.k8s.api.core.v1.VolumeResourceRequirements + map: + fields: + - name: limits + type: + map: + elementType: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity + - name: requests + type: + map: + elementType: + namedType: io.k8s.apimachinery.pkg.api.resource.Quantity - name: io.k8s.api.core.v1.VsphereVirtualDiskVolumeSource map: fields: @@ -7475,33 +8259,10 @@ types: type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.MicroTime default: {} -- name: io.k8s.api.extensions.v1beta1.AllowedCSIDriver +- name: io.k8s.api.extensions.v1beta1.DaemonSet map: fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.extensions.v1beta1.AllowedFlexVolume - map: - fields: - - name: driver - type: - scalar: string - default: "" -- name: io.k8s.api.extensions.v1beta1.AllowedHostPath - map: - fields: - - name: pathPrefix - type: - scalar: string - - name: readOnly - type: - scalar: boolean -- name: io.k8s.api.extensions.v1beta1.DaemonSet - map: - fields: - - name: apiVersion + - name: apiVersion type: scalar: string - name: kind @@ -7549,621 +8310,72 @@ types: - name: revisionHistoryLimit type: scalar: numeric - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} - - name: templateGeneration - type: - scalar: numeric - - name: updateStrategy - type: - namedType: io.k8s.api.extensions.v1beta1.DaemonSetUpdateStrategy - default: {} -- name: io.k8s.api.extensions.v1beta1.DaemonSetStatus - map: - fields: - - name: collisionCount - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.DaemonSetCondition - elementRelationship: associative - keys: - - type - - name: currentNumberScheduled - type: - scalar: numeric - default: 0 - - name: desiredNumberScheduled - type: - scalar: numeric - default: 0 - - name: numberAvailable - type: - scalar: numeric - - name: numberMisscheduled - type: - scalar: numeric - default: 0 - - name: numberReady - type: - scalar: numeric - default: 0 - - name: numberUnavailable - type: - scalar: numeric - - name: observedGeneration - type: - scalar: numeric - - name: updatedNumberScheduled - type: - scalar: numeric -- name: io.k8s.api.extensions.v1beta1.DaemonSetUpdateStrategy - map: - fields: - - name: rollingUpdate - type: - namedType: io.k8s.api.extensions.v1beta1.RollingUpdateDaemonSet - - name: type - type: - scalar: string -- name: io.k8s.api.extensions.v1beta1.Deployment - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.extensions.v1beta1.DeploymentSpec - default: {} - - name: status - type: - namedType: io.k8s.api.extensions.v1beta1.DeploymentStatus - default: {} -- name: io.k8s.api.extensions.v1beta1.DeploymentCondition - map: - fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - default: {} - - name: lastUpdateTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - default: {} - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status - type: - scalar: string - default: "" - - name: type - type: - scalar: string - default: "" -- name: io.k8s.api.extensions.v1beta1.DeploymentSpec - map: - fields: - - name: minReadySeconds - type: - scalar: numeric - - name: paused - type: - scalar: boolean - - name: progressDeadlineSeconds - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - - name: revisionHistoryLimit - type: - scalar: numeric - - name: rollbackTo - type: - namedType: io.k8s.api.extensions.v1beta1.RollbackConfig - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: strategy - type: - namedType: io.k8s.api.extensions.v1beta1.DeploymentStrategy - default: {} - - name: template - type: - namedType: io.k8s.api.core.v1.PodTemplateSpec - default: {} -- name: io.k8s.api.extensions.v1beta1.DeploymentStatus - map: - fields: - - name: availableReplicas - type: - scalar: numeric - - name: collisionCount - type: - scalar: numeric - - name: conditions - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.DeploymentCondition - elementRelationship: associative - keys: - - type - - name: observedGeneration - type: - scalar: numeric - - name: readyReplicas - type: - scalar: numeric - - name: replicas - type: - scalar: numeric - - name: unavailableReplicas - type: - scalar: numeric - - name: updatedReplicas - type: - scalar: numeric -- name: io.k8s.api.extensions.v1beta1.DeploymentStrategy - map: - fields: - - name: rollingUpdate - type: - namedType: io.k8s.api.extensions.v1beta1.RollingUpdateDeployment - - name: type - type: - scalar: string -- name: io.k8s.api.extensions.v1beta1.FSGroupStrategyOptions - map: - fields: - - name: ranges - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.IDRange - elementRelationship: atomic - - name: rule - type: - scalar: string -- name: io.k8s.api.extensions.v1beta1.HTTPIngressPath - map: - fields: - - name: backend - type: - namedType: io.k8s.api.extensions.v1beta1.IngressBackend - default: {} - - name: path - type: - scalar: string - - name: pathType - type: - scalar: string -- name: io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue - map: - fields: - - name: paths - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.HTTPIngressPath - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.HostPortRange - map: - fields: - - name: max - type: - scalar: numeric - default: 0 - - name: min - type: - scalar: numeric - default: 0 -- name: io.k8s.api.extensions.v1beta1.IDRange - map: - fields: - - name: max - type: - scalar: numeric - default: 0 - - name: min - type: - scalar: numeric - default: 0 -- name: io.k8s.api.extensions.v1beta1.IPBlock - map: - fields: - - name: cidr - type: - scalar: string - default: "" - - name: except - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.Ingress - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.extensions.v1beta1.IngressSpec - default: {} - - name: status - type: - namedType: io.k8s.api.extensions.v1beta1.IngressStatus - default: {} -- name: io.k8s.api.extensions.v1beta1.IngressBackend - map: - fields: - - name: resource - type: - namedType: io.k8s.api.core.v1.TypedLocalObjectReference - - name: serviceName - type: - scalar: string - - name: servicePort - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - default: {} -- name: io.k8s.api.extensions.v1beta1.IngressLoadBalancerIngress - map: - fields: - - name: hostname - type: - scalar: string - - name: ip - type: - scalar: string - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.IngressPortStatus - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.IngressLoadBalancerStatus - map: - fields: - - name: ingress - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.IngressLoadBalancerIngress - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.IngressPortStatus - map: - fields: - - name: error - type: - scalar: string - - name: port - type: - scalar: numeric - default: 0 - - name: protocol - type: - scalar: string - default: "" -- name: io.k8s.api.extensions.v1beta1.IngressRule - map: - fields: - - name: host - type: - scalar: string - - name: http - type: - namedType: io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue -- name: io.k8s.api.extensions.v1beta1.IngressSpec - map: - fields: - - name: backend - type: - namedType: io.k8s.api.extensions.v1beta1.IngressBackend - - name: ingressClassName - type: - scalar: string - - name: rules - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.IngressRule - elementRelationship: atomic - - name: tls - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.IngressTLS - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.IngressStatus - map: - fields: - - name: loadBalancer - type: - namedType: io.k8s.api.extensions.v1beta1.IngressLoadBalancerStatus - default: {} -- name: io.k8s.api.extensions.v1beta1.IngressTLS - map: - fields: - - name: hosts - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: secretName - type: - scalar: string -- name: io.k8s.api.extensions.v1beta1.NetworkPolicy - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicySpec - default: {} - - name: status - type: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyStatus - default: {} -- name: io.k8s.api.extensions.v1beta1.NetworkPolicyEgressRule - map: - fields: - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPort - elementRelationship: atomic - - name: to - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPeer - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.NetworkPolicyIngressRule - map: - fields: - - name: from - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPeer - elementRelationship: atomic - - name: ports - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPort - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.NetworkPolicyPeer - map: - fields: - - name: ipBlock - type: - namedType: io.k8s.api.extensions.v1beta1.IPBlock - - name: namespaceSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - - name: podSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: io.k8s.api.extensions.v1beta1.NetworkPolicyPort - map: - fields: - - name: endPort - type: - scalar: numeric - - name: port - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: protocol - type: - scalar: string -- name: io.k8s.api.extensions.v1beta1.NetworkPolicySpec - map: - fields: - - name: egress - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyEgressRule - elementRelationship: atomic - - name: ingress - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyIngressRule - elementRelationship: atomic - - name: podSelector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector - default: {} - - name: policyTypes - type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.NetworkPolicyStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type -- name: io.k8s.api.extensions.v1beta1.PodSecurityPolicy - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.extensions.v1beta1.PodSecurityPolicySpec - default: {} -- name: io.k8s.api.extensions.v1beta1.PodSecurityPolicySpec - map: - fields: - - name: allowPrivilegeEscalation - type: - scalar: boolean - - name: allowedCSIDrivers - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.AllowedCSIDriver - elementRelationship: atomic - - name: allowedCapabilities - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: allowedFlexVolumes - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.AllowedFlexVolume - elementRelationship: atomic - - name: allowedHostPaths - type: - list: - elementType: - namedType: io.k8s.api.extensions.v1beta1.AllowedHostPath - elementRelationship: atomic - - name: allowedProcMountTypes - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: allowedUnsafeSysctls - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: defaultAddCapabilities - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: defaultAllowPrivilegeEscalation - type: - scalar: boolean - - name: forbiddenSysctls - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: fsGroup + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: template type: - namedType: io.k8s.api.extensions.v1beta1.FSGroupStrategyOptions + namedType: io.k8s.api.core.v1.PodTemplateSpec default: {} - - name: hostIPC + - name: templateGeneration type: - scalar: boolean - - name: hostNetwork + scalar: numeric + - name: updateStrategy type: - scalar: boolean - - name: hostPID + namedType: io.k8s.api.extensions.v1beta1.DaemonSetUpdateStrategy + default: {} +- name: io.k8s.api.extensions.v1beta1.DaemonSetStatus + map: + fields: + - name: collisionCount type: - scalar: boolean - - name: hostPorts + scalar: numeric + - name: conditions type: list: elementType: - namedType: io.k8s.api.extensions.v1beta1.HostPortRange - elementRelationship: atomic - - name: privileged + namedType: io.k8s.api.extensions.v1beta1.DaemonSetCondition + elementRelationship: associative + keys: + - type + - name: currentNumberScheduled type: - scalar: boolean - - name: readOnlyRootFilesystem + scalar: numeric + default: 0 + - name: desiredNumberScheduled type: - scalar: boolean - - name: requiredDropCapabilities + scalar: numeric + default: 0 + - name: numberAvailable type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: runAsGroup + scalar: numeric + - name: numberMisscheduled type: - namedType: io.k8s.api.extensions.v1beta1.RunAsGroupStrategyOptions - - name: runAsUser + scalar: numeric + default: 0 + - name: numberReady type: - namedType: io.k8s.api.extensions.v1beta1.RunAsUserStrategyOptions - default: {} - - name: runtimeClass + scalar: numeric + default: 0 + - name: numberUnavailable type: - namedType: io.k8s.api.extensions.v1beta1.RuntimeClassStrategyOptions - - name: seLinux + scalar: numeric + - name: observedGeneration type: - namedType: io.k8s.api.extensions.v1beta1.SELinuxStrategyOptions - default: {} - - name: supplementalGroups + scalar: numeric + - name: updatedNumberScheduled type: - namedType: io.k8s.api.extensions.v1beta1.SupplementalGroupsStrategyOptions - default: {} - - name: volumes + scalar: numeric +- name: io.k8s.api.extensions.v1beta1.DaemonSetUpdateStrategy + map: + fields: + - name: rollingUpdate type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.extensions.v1beta1.ReplicaSet + namedType: io.k8s.api.extensions.v1beta1.RollingUpdateDaemonSet + - name: type + type: + scalar: string +- name: io.k8s.api.extensions.v1beta1.Deployment map: fields: - name: apiVersion @@ -8178,19 +8390,23 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.extensions.v1beta1.ReplicaSetSpec + namedType: io.k8s.api.extensions.v1beta1.DeploymentSpec default: {} - name: status type: - namedType: io.k8s.api.extensions.v1beta1.ReplicaSetStatus + namedType: io.k8s.api.extensions.v1beta1.DeploymentStatus default: {} -- name: io.k8s.api.extensions.v1beta1.ReplicaSetCondition +- name: io.k8s.api.extensions.v1beta1.DeploymentCondition map: fields: - name: lastTransitionTime type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time default: {} + - name: lastUpdateTime + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + default: {} - name: message type: scalar: string @@ -8205,39 +8421,55 @@ types: type: scalar: string default: "" -- name: io.k8s.api.extensions.v1beta1.ReplicaSetSpec +- name: io.k8s.api.extensions.v1beta1.DeploymentSpec map: fields: - name: minReadySeconds type: scalar: numeric + - name: paused + type: + scalar: boolean + - name: progressDeadlineSeconds + type: + scalar: numeric - name: replicas type: scalar: numeric + - name: revisionHistoryLimit + type: + scalar: numeric + - name: rollbackTo + type: + namedType: io.k8s.api.extensions.v1beta1.RollbackConfig - name: selector type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: strategy + type: + namedType: io.k8s.api.extensions.v1beta1.DeploymentStrategy + default: {} - name: template type: namedType: io.k8s.api.core.v1.PodTemplateSpec default: {} -- name: io.k8s.api.extensions.v1beta1.ReplicaSetStatus +- name: io.k8s.api.extensions.v1beta1.DeploymentStatus map: fields: - name: availableReplicas type: scalar: numeric + - name: collisionCount + type: + scalar: numeric - name: conditions type: list: elementType: - namedType: io.k8s.api.extensions.v1beta1.ReplicaSetCondition + namedType: io.k8s.api.extensions.v1beta1.DeploymentCondition elementRelationship: associative keys: - type - - name: fullyLabeledReplicas - type: - scalar: numeric - name: observedGeneration type: scalar: numeric @@ -8247,99 +8479,178 @@ types: - name: replicas type: scalar: numeric - default: 0 -- name: io.k8s.api.extensions.v1beta1.RollbackConfig - map: - fields: - - name: revision + - name: unavailableReplicas type: scalar: numeric -- name: io.k8s.api.extensions.v1beta1.RollingUpdateDaemonSet + - name: updatedReplicas + type: + scalar: numeric +- name: io.k8s.api.extensions.v1beta1.DeploymentStrategy map: fields: - - name: maxSurge + - name: rollingUpdate type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: maxUnavailable + namedType: io.k8s.api.extensions.v1beta1.RollingUpdateDeployment + - name: type type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.extensions.v1beta1.RollingUpdateDeployment + scalar: string +- name: io.k8s.api.extensions.v1beta1.HTTPIngressPath map: fields: - - name: maxSurge + - name: backend type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: maxUnavailable + namedType: io.k8s.api.extensions.v1beta1.IngressBackend + default: {} + - name: path type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString -- name: io.k8s.api.extensions.v1beta1.RunAsGroupStrategyOptions + scalar: string + - name: pathType + type: + scalar: string +- name: io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue map: fields: - - name: ranges + - name: paths type: list: elementType: - namedType: io.k8s.api.extensions.v1beta1.IDRange + namedType: io.k8s.api.extensions.v1beta1.HTTPIngressPath elementRelationship: atomic - - name: rule +- name: io.k8s.api.extensions.v1beta1.IPBlock + map: + fields: + - name: cidr type: scalar: string default: "" -- name: io.k8s.api.extensions.v1beta1.RunAsUserStrategyOptions - map: - fields: - - name: ranges + - name: except type: list: elementType: - namedType: io.k8s.api.extensions.v1beta1.IDRange + scalar: string elementRelationship: atomic - - name: rule +- name: io.k8s.api.extensions.v1beta1.Ingress + map: + fields: + - name: apiVersion type: scalar: string - default: "" -- name: io.k8s.api.extensions.v1beta1.RuntimeClassStrategyOptions + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.extensions.v1beta1.IngressSpec + default: {} + - name: status + type: + namedType: io.k8s.api.extensions.v1beta1.IngressStatus + default: {} +- name: io.k8s.api.extensions.v1beta1.IngressBackend + map: + fields: + - name: resource + type: + namedType: io.k8s.api.core.v1.TypedLocalObjectReference + - name: serviceName + type: + scalar: string + - name: servicePort + type: + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + default: {} +- name: io.k8s.api.extensions.v1beta1.IngressLoadBalancerIngress map: fields: - - name: allowedRuntimeClassNames + - name: hostname + type: + scalar: string + - name: ip + type: + scalar: string + - name: ports type: list: elementType: - scalar: string + namedType: io.k8s.api.extensions.v1beta1.IngressPortStatus elementRelationship: atomic - - name: defaultRuntimeClassName +- name: io.k8s.api.extensions.v1beta1.IngressLoadBalancerStatus + map: + fields: + - name: ingress type: - scalar: string -- name: io.k8s.api.extensions.v1beta1.SELinuxStrategyOptions + list: + elementType: + namedType: io.k8s.api.extensions.v1beta1.IngressLoadBalancerIngress + elementRelationship: atomic +- name: io.k8s.api.extensions.v1beta1.IngressPortStatus map: fields: - - name: rule + - name: error + type: + scalar: string + - name: port + type: + scalar: numeric + default: 0 + - name: protocol type: scalar: string default: "" - - name: seLinuxOptions +- name: io.k8s.api.extensions.v1beta1.IngressRule + map: + fields: + - name: host type: - namedType: io.k8s.api.core.v1.SELinuxOptions -- name: io.k8s.api.extensions.v1beta1.SupplementalGroupsStrategyOptions + scalar: string + - name: http + type: + namedType: io.k8s.api.extensions.v1beta1.HTTPIngressRuleValue +- name: io.k8s.api.extensions.v1beta1.IngressSpec map: fields: - - name: ranges + - name: backend + type: + namedType: io.k8s.api.extensions.v1beta1.IngressBackend + - name: ingressClassName + type: + scalar: string + - name: rules type: list: elementType: - namedType: io.k8s.api.extensions.v1beta1.IDRange + namedType: io.k8s.api.extensions.v1beta1.IngressRule elementRelationship: atomic - - name: rule + - name: tls type: - scalar: string -- name: io.k8s.api.flowcontrol.v1alpha1.FlowDistinguisherMethod + list: + elementType: + namedType: io.k8s.api.extensions.v1beta1.IngressTLS + elementRelationship: atomic +- name: io.k8s.api.extensions.v1beta1.IngressStatus map: fields: - - name: type + - name: loadBalancer + type: + namedType: io.k8s.api.extensions.v1beta1.IngressLoadBalancerStatus + default: {} +- name: io.k8s.api.extensions.v1beta1.IngressTLS + map: + fields: + - name: hosts + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: secretName type: scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1alpha1.FlowSchema +- name: io.k8s.api.extensions.v1beta1.NetworkPolicy map: fields: - name: apiVersion @@ -8354,132 +8665,88 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaSpec - default: {} - - name: status - type: - namedType: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaStatus + namedType: io.k8s.api.extensions.v1beta1.NetworkPolicySpec default: {} -- name: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaCondition +- name: io.k8s.api.extensions.v1beta1.NetworkPolicyEgressRule map: fields: - - name: lastTransitionTime - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - default: {} - - name: message - type: - scalar: string - - name: reason - type: - scalar: string - - name: status + - name: ports type: - scalar: string - - name: type + list: + elementType: + namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPort + elementRelationship: atomic + - name: to type: - scalar: string -- name: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaSpec + list: + elementType: + namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPeer + elementRelationship: atomic +- name: io.k8s.api.extensions.v1beta1.NetworkPolicyIngressRule map: fields: - - name: distinguisherMethod - type: - namedType: io.k8s.api.flowcontrol.v1alpha1.FlowDistinguisherMethod - - name: matchingPrecedence - type: - scalar: numeric - default: 0 - - name: priorityLevelConfiguration - type: - namedType: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationReference - default: {} - - name: rules + - name: from type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1alpha1.PolicyRulesWithSubjects + namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPeer elementRelationship: atomic -- name: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaStatus - map: - fields: - - name: conditions + - name: ports type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1alpha1.FlowSchemaCondition - elementRelationship: associative - keys: - - type -- name: io.k8s.api.flowcontrol.v1alpha1.GroupSubject + namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyPort + elementRelationship: atomic +- name: io.k8s.api.extensions.v1beta1.NetworkPolicyPeer map: fields: - - name: name + - name: ipBlock type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1alpha1.LimitResponse - map: - fields: - - name: queuing + namedType: io.k8s.api.extensions.v1beta1.IPBlock + - name: namespaceSelector type: - namedType: io.k8s.api.flowcontrol.v1alpha1.QueuingConfiguration - - name: type + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: podSelector type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: queuing - discriminatorValue: Queuing -- name: io.k8s.api.flowcontrol.v1alpha1.LimitedPriorityLevelConfiguration + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector +- name: io.k8s.api.extensions.v1beta1.NetworkPolicyPort map: fields: - - name: assuredConcurrencyShares + - name: endPort type: scalar: numeric - default: 0 - - name: limitResponse - type: - namedType: io.k8s.api.flowcontrol.v1alpha1.LimitResponse - default: {} -- name: io.k8s.api.flowcontrol.v1alpha1.NonResourcePolicyRule - map: - fields: - - name: nonResourceURLs + - name: port type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: verbs + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + - name: protocol type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.flowcontrol.v1alpha1.PolicyRulesWithSubjects + scalar: string +- name: io.k8s.api.extensions.v1beta1.NetworkPolicySpec map: fields: - - name: nonResourceRules + - name: egress type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1alpha1.NonResourcePolicyRule + namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyEgressRule elementRelationship: atomic - - name: resourceRules + - name: ingress type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1alpha1.ResourcePolicyRule + namedType: io.k8s.api.extensions.v1beta1.NetworkPolicyIngressRule elementRelationship: atomic - - name: subjects + - name: podSelector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + default: {} + - name: policyTypes type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1alpha1.Subject + scalar: string elementRelationship: atomic -- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfiguration +- name: io.k8s.api.extensions.v1beta1.ReplicaSet map: fields: - name: apiVersion @@ -8494,13 +8761,13 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationSpec + namedType: io.k8s.api.extensions.v1beta1.ReplicaSetSpec default: {} - name: status type: - namedType: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationStatus + namedType: io.k8s.api.extensions.v1beta1.ReplicaSetStatus default: {} -- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationCondition +- name: io.k8s.api.extensions.v1beta1.ReplicaSetCondition map: fields: - name: lastTransitionTime @@ -8516,130 +8783,87 @@ types: - name: status type: scalar: string + default: "" - name: type type: scalar: string -- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationReference - map: - fields: - - name: name - type: - scalar: string default: "" -- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationSpec +- name: io.k8s.api.extensions.v1beta1.ReplicaSetSpec map: fields: - - name: limited + - name: minReadySeconds type: - namedType: io.k8s.api.flowcontrol.v1alpha1.LimitedPriorityLevelConfiguration - - name: type + scalar: numeric + - name: replicas type: - scalar: string - default: "" - unions: - - discriminator: type - fields: - - fieldName: limited - discriminatorValue: Limited -- name: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationStatus + scalar: numeric + - name: selector + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: template + type: + namedType: io.k8s.api.core.v1.PodTemplateSpec + default: {} +- name: io.k8s.api.extensions.v1beta1.ReplicaSetStatus map: fields: + - name: availableReplicas + type: + scalar: numeric - name: conditions type: list: elementType: - namedType: io.k8s.api.flowcontrol.v1alpha1.PriorityLevelConfigurationCondition + namedType: io.k8s.api.extensions.v1beta1.ReplicaSetCondition elementRelationship: associative keys: - type -- name: io.k8s.api.flowcontrol.v1alpha1.QueuingConfiguration - map: - fields: - - name: handSize + - name: fullyLabeledReplicas type: scalar: numeric - default: 0 - - name: queueLengthLimit + - name: observedGeneration type: scalar: numeric - default: 0 - - name: queues + - name: readyReplicas + type: + scalar: numeric + - name: replicas type: scalar: numeric default: 0 -- name: io.k8s.api.flowcontrol.v1alpha1.ResourcePolicyRule +- name: io.k8s.api.extensions.v1beta1.RollbackConfig map: fields: - - name: apiGroups - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: clusterScope - type: - scalar: boolean - - name: namespaces - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: resources - type: - list: - elementType: - scalar: string - elementRelationship: associative - - name: verbs + - name: revision type: - list: - elementType: - scalar: string - elementRelationship: associative -- name: io.k8s.api.flowcontrol.v1alpha1.ServiceAccountSubject + scalar: numeric +- name: io.k8s.api.extensions.v1beta1.RollingUpdateDaemonSet map: fields: - - name: name + - name: maxSurge type: - scalar: string - default: "" - - name: namespace + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + - name: maxUnavailable type: - scalar: string - default: "" -- name: io.k8s.api.flowcontrol.v1alpha1.Subject + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString +- name: io.k8s.api.extensions.v1beta1.RollingUpdateDeployment map: fields: - - name: group - type: - namedType: io.k8s.api.flowcontrol.v1alpha1.GroupSubject - - name: kind - type: - scalar: string - default: "" - - name: serviceAccount + - name: maxSurge type: - namedType: io.k8s.api.flowcontrol.v1alpha1.ServiceAccountSubject - - name: user + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + - name: maxUnavailable type: - namedType: io.k8s.api.flowcontrol.v1alpha1.UserSubject - unions: - - discriminator: kind - fields: - - fieldName: group - discriminatorValue: Group - - fieldName: serviceAccount - discriminatorValue: ServiceAccount - - fieldName: user - discriminatorValue: User -- name: io.k8s.api.flowcontrol.v1alpha1.UserSubject + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString +- name: io.k8s.api.flowcontrol.v1beta1.ExemptPriorityLevelConfiguration map: fields: - - name: name + - name: lendablePercent type: - scalar: string - default: "" + scalar: numeric + - name: nominalConcurrencyShares + type: + scalar: numeric - name: io.k8s.api.flowcontrol.v1beta1.FlowDistinguisherMethod map: fields: @@ -8747,6 +8971,12 @@ types: type: scalar: numeric default: 0 + - name: borrowingLimitPercent + type: + scalar: numeric + - name: lendablePercent + type: + scalar: numeric - name: limitResponse type: namedType: io.k8s.api.flowcontrol.v1beta1.LimitResponse @@ -8837,6 +9067,9 @@ types: - name: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationSpec map: fields: + - name: exempt + type: + namedType: io.k8s.api.flowcontrol.v1beta1.ExemptPriorityLevelConfiguration - name: limited type: namedType: io.k8s.api.flowcontrol.v1beta1.LimitedPriorityLevelConfiguration @@ -8847,6 +9080,8 @@ types: unions: - discriminator: type fields: + - fieldName: exempt + discriminatorValue: Exempt - fieldName: limited discriminatorValue: Limited - name: io.k8s.api.flowcontrol.v1beta1.PriorityLevelConfigurationStatus @@ -8948,6 +9183,15 @@ types: type: scalar: string default: "" +- name: io.k8s.api.flowcontrol.v1beta2.ExemptPriorityLevelConfiguration + map: + fields: + - name: lendablePercent + type: + scalar: numeric + - name: nominalConcurrencyShares + type: + scalar: numeric - name: io.k8s.api.flowcontrol.v1beta2.FlowDistinguisherMethod map: fields: @@ -9055,6 +9299,12 @@ types: type: scalar: numeric default: 0 + - name: borrowingLimitPercent + type: + scalar: numeric + - name: lendablePercent + type: + scalar: numeric - name: limitResponse type: namedType: io.k8s.api.flowcontrol.v1beta2.LimitResponse @@ -9145,6 +9395,9 @@ types: - name: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationSpec map: fields: + - name: exempt + type: + namedType: io.k8s.api.flowcontrol.v1beta2.ExemptPriorityLevelConfiguration - name: limited type: namedType: io.k8s.api.flowcontrol.v1beta2.LimitedPriorityLevelConfiguration @@ -9155,6 +9408,8 @@ types: unions: - discriminator: type fields: + - fieldName: exempt + discriminatorValue: Exempt - fieldName: limited discriminatorValue: Limited - name: io.k8s.api.flowcontrol.v1beta2.PriorityLevelConfigurationStatus @@ -9254,8 +9509,17 @@ types: fields: - name: name type: - scalar: string - default: "" + scalar: string + default: "" +- name: io.k8s.api.flowcontrol.v1beta3.ExemptPriorityLevelConfiguration + map: + fields: + - name: lendablePercent + type: + scalar: numeric + - name: nominalConcurrencyShares + type: + scalar: numeric - name: io.k8s.api.flowcontrol.v1beta3.FlowDistinguisherMethod map: fields: @@ -9359,6 +9623,12 @@ types: - name: io.k8s.api.flowcontrol.v1beta3.LimitedPriorityLevelConfiguration map: fields: + - name: borrowingLimitPercent + type: + scalar: numeric + - name: lendablePercent + type: + scalar: numeric - name: limitResponse type: namedType: io.k8s.api.flowcontrol.v1beta3.LimitResponse @@ -9453,6 +9723,9 @@ types: - name: io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationSpec map: fields: + - name: exempt + type: + namedType: io.k8s.api.flowcontrol.v1beta3.ExemptPriorityLevelConfiguration - name: limited type: namedType: io.k8s.api.flowcontrol.v1beta3.LimitedPriorityLevelConfiguration @@ -9463,6 +9736,8 @@ types: unions: - discriminator: type fields: + - fieldName: exempt + discriminatorValue: Exempt - fieldName: limited discriminatorValue: Limited - name: io.k8s.api.flowcontrol.v1beta3.PriorityLevelConfigurationStatus @@ -9849,10 +10124,6 @@ types: type: namedType: io.k8s.api.networking.v1.NetworkPolicySpec default: {} - - name: status - type: - namedType: io.k8s.api.networking.v1.NetworkPolicyStatus - default: {} - name: io.k8s.api.networking.v1.NetworkPolicyEgressRule map: fields: @@ -9932,17 +10203,6 @@ types: elementType: scalar: string elementRelationship: atomic -- name: io.k8s.api.networking.v1.NetworkPolicyStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - name: io.k8s.api.networking.v1.ServiceBackendPort map: fields: @@ -9987,6 +10247,47 @@ types: type: scalar: numeric default: 0 +- name: io.k8s.api.networking.v1alpha1.IPAddress + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.networking.v1alpha1.IPAddressSpec + default: {} +- name: io.k8s.api.networking.v1alpha1.IPAddressSpec + map: + fields: + - name: parentRef + type: + namedType: io.k8s.api.networking.v1alpha1.ParentReference +- name: io.k8s.api.networking.v1alpha1.ParentReference + map: + fields: + - name: group + type: + scalar: string + - name: name + type: + scalar: string + - name: namespace + type: + scalar: string + - name: resource + type: + scalar: string + - name: uid + type: + scalar: string - name: io.k8s.api.networking.v1beta1.HTTPIngressPath map: fields: @@ -10370,6 +10671,9 @@ types: - name: selector type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: unhealthyPodEvictionPolicy + type: + scalar: string - name: io.k8s.api.policy.v1.PodDisruptionBudgetStatus map: fields: @@ -10405,29 +10709,6 @@ types: - name: observedGeneration type: scalar: numeric -- name: io.k8s.api.policy.v1beta1.AllowedCSIDriver - map: - fields: - - name: name - type: - scalar: string - default: "" -- name: io.k8s.api.policy.v1beta1.AllowedFlexVolume - map: - fields: - - name: driver - type: - scalar: string - default: "" -- name: io.k8s.api.policy.v1beta1.AllowedHostPath - map: - fields: - - name: pathPrefix - type: - scalar: string - - name: readOnly - type: - scalar: boolean - name: io.k8s.api.policy.v1beta1.Eviction map: fields: @@ -10444,40 +10725,6 @@ types: type: namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta default: {} -- name: io.k8s.api.policy.v1beta1.FSGroupStrategyOptions - map: - fields: - - name: ranges - type: - list: - elementType: - namedType: io.k8s.api.policy.v1beta1.IDRange - elementRelationship: atomic - - name: rule - type: - scalar: string -- name: io.k8s.api.policy.v1beta1.HostPortRange - map: - fields: - - name: max - type: - scalar: numeric - default: 0 - - name: min - type: - scalar: numeric - default: 0 -- name: io.k8s.api.policy.v1beta1.IDRange - map: - fields: - - name: max - type: - scalar: numeric - default: 0 - - name: min - type: - scalar: numeric - default: 0 - name: io.k8s.api.policy.v1beta1.PodDisruptionBudget map: fields: @@ -10493,248 +10740,62 @@ types: default: {} - name: spec type: - namedType: io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec - default: {} - - name: status - type: - namedType: io.k8s.api.policy.v1beta1.PodDisruptionBudgetStatus - default: {} -- name: io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec - map: - fields: - - name: maxUnavailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: minAvailable - type: - namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString - - name: selector - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector -- name: io.k8s.api.policy.v1beta1.PodDisruptionBudgetStatus - map: - fields: - - name: conditions - type: - list: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition - elementRelationship: associative - keys: - - type - - name: currentHealthy - type: - scalar: numeric - default: 0 - - name: desiredHealthy - type: - scalar: numeric - default: 0 - - name: disruptedPods - type: - map: - elementType: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time - - name: disruptionsAllowed - type: - scalar: numeric - default: 0 - - name: expectedPods - type: - scalar: numeric - default: 0 - - name: observedGeneration - type: - scalar: numeric -- name: io.k8s.api.policy.v1beta1.PodSecurityPolicy - map: - fields: - - name: apiVersion - type: - scalar: string - - name: kind - type: - scalar: string - - name: metadata - type: - namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta - default: {} - - name: spec - type: - namedType: io.k8s.api.policy.v1beta1.PodSecurityPolicySpec - default: {} -- name: io.k8s.api.policy.v1beta1.PodSecurityPolicySpec - map: - fields: - - name: allowPrivilegeEscalation - type: - scalar: boolean - - name: allowedCSIDrivers - type: - list: - elementType: - namedType: io.k8s.api.policy.v1beta1.AllowedCSIDriver - elementRelationship: atomic - - name: allowedCapabilities - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: allowedFlexVolumes - type: - list: - elementType: - namedType: io.k8s.api.policy.v1beta1.AllowedFlexVolume - elementRelationship: atomic - - name: allowedHostPaths - type: - list: - elementType: - namedType: io.k8s.api.policy.v1beta1.AllowedHostPath - elementRelationship: atomic - - name: allowedProcMountTypes - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: allowedUnsafeSysctls - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: defaultAddCapabilities - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: defaultAllowPrivilegeEscalation - type: - scalar: boolean - - name: forbiddenSysctls - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: fsGroup - type: - namedType: io.k8s.api.policy.v1beta1.FSGroupStrategyOptions - default: {} - - name: hostIPC - type: - scalar: boolean - - name: hostNetwork - type: - scalar: boolean - - name: hostPID - type: - scalar: boolean - - name: hostPorts - type: - list: - elementType: - namedType: io.k8s.api.policy.v1beta1.HostPortRange - elementRelationship: atomic - - name: privileged - type: - scalar: boolean - - name: readOnlyRootFilesystem - type: - scalar: boolean - - name: requiredDropCapabilities - type: - list: - elementType: - scalar: string - elementRelationship: atomic - - name: runAsGroup - type: - namedType: io.k8s.api.policy.v1beta1.RunAsGroupStrategyOptions - - name: runAsUser - type: - namedType: io.k8s.api.policy.v1beta1.RunAsUserStrategyOptions - default: {} - - name: runtimeClass - type: - namedType: io.k8s.api.policy.v1beta1.RuntimeClassStrategyOptions - - name: seLinux - type: - namedType: io.k8s.api.policy.v1beta1.SELinuxStrategyOptions - default: {} - - name: supplementalGroups - type: - namedType: io.k8s.api.policy.v1beta1.SupplementalGroupsStrategyOptions + namedType: io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec default: {} - - name: volumes + - name: status type: - list: - elementType: - scalar: string - elementRelationship: atomic -- name: io.k8s.api.policy.v1beta1.RunAsGroupStrategyOptions + namedType: io.k8s.api.policy.v1beta1.PodDisruptionBudgetStatus + default: {} +- name: io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec map: fields: - - name: ranges + - name: maxUnavailable type: - list: - elementType: - namedType: io.k8s.api.policy.v1beta1.IDRange - elementRelationship: atomic - - name: rule + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + - name: minAvailable type: - scalar: string - default: "" -- name: io.k8s.api.policy.v1beta1.RunAsUserStrategyOptions - map: - fields: - - name: ranges + namedType: io.k8s.apimachinery.pkg.util.intstr.IntOrString + - name: selector type: - list: - elementType: - namedType: io.k8s.api.policy.v1beta1.IDRange - elementRelationship: atomic - - name: rule + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector + - name: unhealthyPodEvictionPolicy type: scalar: string - default: "" -- name: io.k8s.api.policy.v1beta1.RuntimeClassStrategyOptions +- name: io.k8s.api.policy.v1beta1.PodDisruptionBudgetStatus map: fields: - - name: allowedRuntimeClassNames + - name: conditions type: list: elementType: - scalar: string - elementRelationship: atomic - - name: defaultRuntimeClassName - type: - scalar: string -- name: io.k8s.api.policy.v1beta1.SELinuxStrategyOptions - map: - fields: - - name: rule + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Condition + elementRelationship: associative + keys: + - type + - name: currentHealthy type: - scalar: string - default: "" - - name: seLinuxOptions + scalar: numeric + default: 0 + - name: desiredHealthy type: - namedType: io.k8s.api.core.v1.SELinuxOptions -- name: io.k8s.api.policy.v1beta1.SupplementalGroupsStrategyOptions - map: - fields: - - name: ranges + scalar: numeric + default: 0 + - name: disruptedPods type: - list: + map: elementType: - namedType: io.k8s.api.policy.v1beta1.IDRange - elementRelationship: atomic - - name: rule + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.Time + - name: disruptionsAllowed type: - scalar: string + scalar: numeric + default: 0 + - name: expectedPods + type: + scalar: numeric + default: 0 + - name: observedGeneration + type: + scalar: numeric - name: io.k8s.api.rbac.v1.AggregationRule map: fields: @@ -11220,6 +11281,240 @@ types: - name: namespace type: scalar: string +- name: io.k8s.api.resource.v1alpha2.AllocationResult + map: + fields: + - name: availableOnNodes + type: + namedType: io.k8s.api.core.v1.NodeSelector + - name: resourceHandles + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.ResourceHandle + elementRelationship: atomic + - name: shareable + type: + scalar: boolean +- name: io.k8s.api.resource.v1alpha2.PodSchedulingContext + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.resource.v1alpha2.PodSchedulingContextSpec + default: {} + - name: status + type: + namedType: io.k8s.api.resource.v1alpha2.PodSchedulingContextStatus + default: {} +- name: io.k8s.api.resource.v1alpha2.PodSchedulingContextSpec + map: + fields: + - name: potentialNodes + type: + list: + elementType: + scalar: string + elementRelationship: atomic + - name: selectedNode + type: + scalar: string +- name: io.k8s.api.resource.v1alpha2.PodSchedulingContextStatus + map: + fields: + - name: resourceClaims + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.ResourceClaimSchedulingStatus + elementRelationship: associative + keys: + - name +- name: io.k8s.api.resource.v1alpha2.ResourceClaim + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.resource.v1alpha2.ResourceClaimSpec + default: {} + - name: status + type: + namedType: io.k8s.api.resource.v1alpha2.ResourceClaimStatus + default: {} +- name: io.k8s.api.resource.v1alpha2.ResourceClaimConsumerReference + map: + fields: + - name: apiGroup + type: + scalar: string + - name: name + type: + scalar: string + default: "" + - name: resource + type: + scalar: string + default: "" + - name: uid + type: + scalar: string + default: "" +- name: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference + map: + fields: + - name: apiGroup + type: + scalar: string + - name: kind + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" +- name: io.k8s.api.resource.v1alpha2.ResourceClaimSchedulingStatus + map: + fields: + - name: name + type: + scalar: string + - name: unsuitableNodes + type: + list: + elementType: + scalar: string + elementRelationship: atomic +- name: io.k8s.api.resource.v1alpha2.ResourceClaimSpec + map: + fields: + - name: allocationMode + type: + scalar: string + - name: parametersRef + type: + namedType: io.k8s.api.resource.v1alpha2.ResourceClaimParametersReference + - name: resourceClassName + type: + scalar: string + default: "" +- name: io.k8s.api.resource.v1alpha2.ResourceClaimStatus + map: + fields: + - name: allocation + type: + namedType: io.k8s.api.resource.v1alpha2.AllocationResult + - name: deallocationRequested + type: + scalar: boolean + - name: driverName + type: + scalar: string + - name: reservedFor + type: + list: + elementType: + namedType: io.k8s.api.resource.v1alpha2.ResourceClaimConsumerReference + elementRelationship: associative + keys: + - uid +- name: io.k8s.api.resource.v1alpha2.ResourceClaimTemplate + map: + fields: + - name: apiVersion + type: + scalar: string + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.resource.v1alpha2.ResourceClaimTemplateSpec + default: {} +- name: io.k8s.api.resource.v1alpha2.ResourceClaimTemplateSpec + map: + fields: + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: spec + type: + namedType: io.k8s.api.resource.v1alpha2.ResourceClaimSpec + default: {} +- name: io.k8s.api.resource.v1alpha2.ResourceClass + map: + fields: + - name: apiVersion + type: + scalar: string + - name: driverName + type: + scalar: string + default: "" + - name: kind + type: + scalar: string + - name: metadata + type: + namedType: io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta + default: {} + - name: parametersRef + type: + namedType: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference + - name: suitableNodes + type: + namedType: io.k8s.api.core.v1.NodeSelector +- name: io.k8s.api.resource.v1alpha2.ResourceClassParametersReference + map: + fields: + - name: apiGroup + type: + scalar: string + - name: kind + type: + scalar: string + default: "" + - name: name + type: + scalar: string + default: "" + - name: namespace + type: + scalar: string +- name: io.k8s.api.resource.v1alpha2.ResourceHandle + map: + fields: + - name: data + type: + scalar: string + - name: driverName + type: + scalar: string - name: io.k8s.api.scheduling.v1.PriorityClass map: fields: diff --git a/mockkubeapiserver/clock.go b/mockkubeapiserver/storage/clock.go similarity index 95% rename from mockkubeapiserver/clock.go rename to mockkubeapiserver/storage/clock.go index fe8d02fd..4afe41a2 100644 --- a/mockkubeapiserver/clock.go +++ b/mockkubeapiserver/storage/clock.go @@ -1,4 +1,4 @@ -package mockkubeapiserver +package storage import ( "time" @@ -29,6 +29,7 @@ func NewTestClock() *TestClock { t := time.Date(2022, time.January, 1, 0, 0, 0, 0, time.UTC) return &TestClock{t: t} } + func (c *TestClock) Now() metav1.Time { t := c.t c.t = t.Add(time.Second) diff --git a/mockkubeapiserver/storage/hook.go b/mockkubeapiserver/storage/hook.go new file mode 100644 index 00000000..8e85bbb1 --- /dev/null +++ b/mockkubeapiserver/storage/hook.go @@ -0,0 +1,6 @@ +package storage + +// A Hook implements a lightweight watch on all objects, intended for use to mock controller behaviour. +type Hook interface { + OnWatchEvent(ev *WatchEvent) +} diff --git a/mockkubeapiserver/storage/interface.go b/mockkubeapiserver/storage/interface.go new file mode 100644 index 00000000..17af8782 --- /dev/null +++ b/mockkubeapiserver/storage/interface.go @@ -0,0 +1,33 @@ +package storage + +import ( + "k8s.io/apimachinery/pkg/api/meta" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" +) + +// Storage is a pluggable store of objects +type Storage interface { + // FindResource returns the ResourceInfo for a group-resource. + // The ResourceInfo allows CRUD operations on that resource. + FindResource(gr schema.GroupResource) ResourceInfo + + // AllResources returns the metadata for all resources. + AllResources() []metav1.APIResource + + // AddObject can be called to "sideload" an object, useful for testing. + AddObject(obj *unstructured.Unstructured) error + + // RegisterType is used to register a built-in type. + RegisterType(gvk schema.GroupVersionKind, resource string, scope meta.RESTScope) + + // AddStorageHook registers a hook, that will be called whenever any object changes. + AddStorageHook(hook Hook) + + // UpdateCRD should be called whenever a CRD changes (likely by a hook). + UpdateCRD(ev *WatchEvent) error +} + +// WatchCallback is the function signature for the callback function when objects are changed. +type WatchCallback func(ev *WatchEvent) error diff --git a/mockkubeapiserver/storage/memorystorage/crd.go b/mockkubeapiserver/storage/memorystorage/crd.go new file mode 100644 index 00000000..70ac7536 --- /dev/null +++ b/mockkubeapiserver/storage/memorystorage/crd.go @@ -0,0 +1,101 @@ +package memorystorage + +import ( + "fmt" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver/storage" +) + +// UpdateCRD is called whenever a CRD is updated. +// We register the types from the CRD. +func (s *MemoryStorage) UpdateCRD(ev *storage.WatchEvent) error { + // TODO: Deleted / changed CRDs + + u := ev.Unstructured() + + group, _, _ := unstructured.NestedString(u.Object, "spec", "group") + if group == "" { + return fmt.Errorf("spec.group not set") + } + + kind, _, _ := unstructured.NestedString(u.Object, "spec", "names", "kind") + if kind == "" { + return fmt.Errorf("spec.names.kind not set") + } + + resource, _, _ := unstructured.NestedString(u.Object, "spec", "names", "plural") + if resource == "" { + return fmt.Errorf("spec.names.plural not set") + } + + scope, _, _ := unstructured.NestedString(u.Object, "spec", "scope") + if scope == "" { + return fmt.Errorf("spec.scope not set") + } + + versionsObj, found, _ := unstructured.NestedFieldNoCopy(u.Object, "spec", "versions") + if !found { + return fmt.Errorf("spec.versions not set") + } + + versions, ok := versionsObj.([]interface{}) + if !ok { + return fmt.Errorf("spec.versions not a slice") + } + + for _, versionObj := range versions { + version, ok := versionObj.(map[string]interface{}) + if !ok { + return fmt.Errorf("spec.versions element not an object") + } + + versionName, _, _ := unstructured.NestedString(version, "name") + if versionName == "" { + return fmt.Errorf("version name not set") + } + gvk := schema.GroupVersionKind{Group: group, Version: versionName, Kind: kind} + gvr := gvk.GroupVersion().WithResource(resource) + gr := gvr.GroupResource() + + storage := &resourceStorage{ + GroupResource: gr, + objects: make(map[types.NamespacedName]*unstructured.Unstructured), + parent: s, + } + + // TODO: share storage across different versions + s.resourceStorages[gr] = storage + + r := &memoryResourceInfo{ + api: metav1.APIResource{ + Name: resource, + Group: gvk.Group, + Version: gvk.Version, + Kind: gvk.Kind, + }, + gvk: gvk, + gvr: gvr, + parent: s, + storage: storage, + } + r.listGVK = gvk.GroupVersion().WithKind(gvk.Kind + "List") + + // TODO: Set r.TypeInfo from schema + + switch scope { + case "Namespaced": + r.api.Namespaced = true + case "Cluster": + r.api.Namespaced = false + default: + return fmt.Errorf("scope %q is not recognized", scope) + } + + s.schema.resources = append(s.schema.resources, r) + } + return nil +} diff --git a/mockkubeapiserver/memorystorage.go b/mockkubeapiserver/storage/memorystorage/memorystorage.go similarity index 63% rename from mockkubeapiserver/memorystorage.go rename to mockkubeapiserver/storage/memorystorage/memorystorage.go index 6989e232..e07a6454 100644 --- a/mockkubeapiserver/memorystorage.go +++ b/mockkubeapiserver/storage/memorystorage/memorystorage.go @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -package mockkubeapiserver +package memorystorage import ( "context" @@ -28,6 +28,7 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" "k8s.io/apimachinery/pkg/types" "k8s.io/klog/v2" + "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver/storage" ) type MemoryStorage struct { @@ -37,11 +38,14 @@ type MemoryStorage struct { resourceVersionClock int64 - clock Clock - uidGenerator UIDGenerator + clock storage.Clock + uidGenerator storage.UIDGenerator + + hooksMutex sync.Mutex + hooks []storage.Hook } -func NewMemoryStorage(clock Clock, uidGenerator UIDGenerator) (*MemoryStorage, error) { +func NewMemoryStorage(clock storage.Clock, uidGenerator storage.UIDGenerator) (*MemoryStorage, error) { s := &MemoryStorage{ resourceStorages: make(map[schema.GroupResource]*resourceStorage), resourceVersionClock: 1, @@ -59,37 +63,38 @@ func NewMemoryStorage(clock Clock, uidGenerator UIDGenerator) (*MemoryStorage, e gvr := gvk.GroupVersion().WithResource(builtinType.Resource) gr := gvr.GroupResource() - storage := &resourceStorage{ + rs := &resourceStorage{ GroupResource: gr, objects: make(map[types.NamespacedName]*unstructured.Unstructured), + parent: s, } // TODO: share storage across different versions - s.resourceStorages[gr] = storage + s.resourceStorages[gr] = rs - r := &ResourceInfo{ - API: metav1.APIResource{ + r := &memoryResourceInfo{ + api: metav1.APIResource{ Name: builtinType.Resource, Group: gvk.Group, Version: gvk.Version, Kind: gvk.Kind, }, - GVK: gvk, - GVR: gvr, - storage: storage, + gvk: gvk, + gvr: gvr, + + parent: s, + storage: rs, } - r.ListGVK = gvk.GroupVersion().WithKind(gvk.Kind + "List") + r.listGVK = gvk.GroupVersion().WithKind(gvk.Kind + "List") parserType := s.schema.builtin.Parser.Type(builtinType.Key) - r.TypeInfo = &typeInfo{ - ParserType: parserType, - } - if r.TypeInfo == nil { - klog.Fatalf("type info not known for %v", gvk) + r.parseableType = &parserType + if r.parseableType == nil || !r.parseableType.IsValid() { + klog.Warningf("type info not known for %v", gvk) } if meta.RESTScopeName(builtinType.Scope) == meta.RESTScopeNameNamespace { - r.API.Namespaced = true + r.api.Namespaced = true } s.schema.resources = append(s.schema.resources, r) @@ -98,17 +103,6 @@ func NewMemoryStorage(clock Clock, uidGenerator UIDGenerator) (*MemoryStorage, e return s, nil } -type ResourceInfo struct { - API metav1.APIResource - GVR schema.GroupVersionResource - GVK schema.GroupVersionKind - ListGVK schema.GroupVersionKind - - TypeInfo *typeInfo - - storage *resourceStorage -} - // AddObject pre-creates an object func (s *MemoryStorage) AddObject(obj *unstructured.Unstructured) error { ctx := context.Background() @@ -131,10 +125,17 @@ func (s *MemoryStorage) AddObject(obj *unstructured.Unstructured) error { return fmt.Errorf("object group/version/kind %v not known", gvk) } - return s.CreateObject(ctx, resource, id, obj) + return resource.CreateObject(ctx, id, obj) } -func (s *MemoryStorage) GetObject(ctx context.Context, resource *ResourceInfo, id types.NamespacedName) (*unstructured.Unstructured, bool, error) { +func (s *MemoryStorage) AddStorageHook(hook storage.Hook) { + s.hooksMutex.Lock() + defer s.hooksMutex.Unlock() + + s.hooks = append(s.hooks, hook) +} + +func (resource *memoryResourceInfo) GetObject(ctx context.Context, id types.NamespacedName) (*unstructured.Unstructured, bool, error) { resource.storage.mutex.Lock() defer resource.storage.mutex.Unlock() @@ -146,11 +147,7 @@ func (s *MemoryStorage) GetObject(ctx context.Context, resource *ResourceInfo, i return object, true, nil } -type ListFilter struct { - Namespace string -} - -func (s *MemoryStorage) ListObjects(ctx context.Context, resource *ResourceInfo, filter ListFilter) (*unstructured.UnstructuredList, error) { +func (resource *memoryResourceInfo) ListObjects(ctx context.Context, filter storage.ListFilter) (*unstructured.UnstructuredList, error) { resource.storage.mutex.Lock() defer resource.storage.mutex.Unlock() @@ -165,72 +162,69 @@ func (s *MemoryStorage) ListObjects(ctx context.Context, resource *ResourceInfo, ret.Items = append(ret.Items, *obj) } - rv := strconv.FormatInt(s.resourceVersionClock, 10) + rv := strconv.FormatInt(resource.parent.resourceVersionClock, 10) ret.SetResourceVersion(rv) return ret, nil } -func (s *MemoryStorage) CreateObject(ctx context.Context, resource *ResourceInfo, id types.NamespacedName, u *unstructured.Unstructured) error { +func (resource *memoryResourceInfo) CreateObject(ctx context.Context, id types.NamespacedName, u *unstructured.Unstructured) error { resource.storage.mutex.Lock() defer resource.storage.mutex.Unlock() _, found := resource.storage.objects[id] if found { - return apierrors.NewAlreadyExists(resource.GVR.GroupResource(), id.Name) + return apierrors.NewAlreadyExists(resource.gvr.GroupResource(), id.Name) } - u.SetCreationTimestamp(s.clock.Now()) + u.SetCreationTimestamp(resource.parent.clock.Now()) - uid := s.uidGenerator.NewUID() + uid := resource.parent.uidGenerator.NewUID() u.SetUID(uid) - rv := strconv.FormatInt(s.resourceVersionClock, 10) - s.resourceVersionClock++ + rv := strconv.FormatInt(resource.parent.resourceVersionClock, 10) + resource.parent.resourceVersionClock++ u.SetResourceVersion(rv) resource.storage.objects[id] = u - s.objectChanged(u) - resource.storage.broadcastEventHoldingLock(ctx, "ADDED", u) + resource.storage.broadcastEventHoldingLock(ctx, resource.gvk, "ADDED", u) return nil } -func (s *MemoryStorage) UpdateObject(ctx context.Context, resource *ResourceInfo, id types.NamespacedName, u *unstructured.Unstructured) error { +func (resource *memoryResourceInfo) UpdateObject(ctx context.Context, id types.NamespacedName, u *unstructured.Unstructured) error { resource.storage.mutex.Lock() defer resource.storage.mutex.Unlock() _, found := resource.storage.objects[id] if !found { - return apierrors.NewAlreadyExists(resource.GVR.GroupResource(), id.Name) + return apierrors.NewAlreadyExists(resource.gvr.GroupResource(), id.Name) } - rv := strconv.FormatInt(s.resourceVersionClock, 10) - s.resourceVersionClock++ + rv := strconv.FormatInt(resource.parent.resourceVersionClock, 10) + resource.parent.resourceVersionClock++ u.SetResourceVersion(rv) resource.storage.objects[id] = u - s.objectChanged(u) - resource.storage.broadcastEventHoldingLock(ctx, "MODIFIED", u) + resource.storage.broadcastEventHoldingLock(ctx, resource.gvk, "MODIFIED", u) return nil } -func (s *MemoryStorage) DeleteObject(ctx context.Context, resource *ResourceInfo, id types.NamespacedName) (*unstructured.Unstructured, error) { +func (resource *memoryResourceInfo) DeleteObject(ctx context.Context, id types.NamespacedName) (*unstructured.Unstructured, error) { resource.storage.mutex.Lock() defer resource.storage.mutex.Unlock() deletedObj, found := resource.storage.objects[id] if !found { // TODO: return apierrors something? - return nil, apierrors.NewNotFound(resource.GVR.GroupResource(), id.Name) + return nil, apierrors.NewNotFound(resource.gvr.GroupResource(), id.Name) } delete(resource.storage.objects, id) - s.objectChanged(deletedObj) - resource.storage.broadcastEventHoldingLock(ctx, "DELETED", deletedObj) + resource.storage.broadcastEventHoldingLock(ctx, resource.gvk, "DELETED", deletedObj) return deletedObj, nil } @@ -246,36 +240,36 @@ func (s *MemoryStorage) RegisterType(gvk schema.GroupVersionKind, resource strin storage := &resourceStorage{ GroupResource: gr, objects: make(map[types.NamespacedName]*unstructured.Unstructured), + parent: s, } // TODO: share storage across different versions s.resourceStorages[gr] = storage - r := &ResourceInfo{ - API: metav1.APIResource{ + r := &memoryResourceInfo{ + api: metav1.APIResource{ Name: resource, Group: gvk.Group, Version: gvk.Version, Kind: gvk.Kind, }, - GVK: gvk, - GVR: gvr, + gvk: gvk, + gvr: gvr, storage: storage, + parent: s, } - r.ListGVK = gvk.GroupVersion().WithKind(gvk.Kind + "List") + r.listGVK = gvk.GroupVersion().WithKind(gvk.Kind + "List") if gvk.Group == "" { parserType := s.schema.builtin.Parser.Type("io.k8s.api.core." + gvk.Version + "." + gvk.Kind) - r.TypeInfo = &typeInfo{ - ParserType: parserType, - } + r.parseableType = &parserType } - if r.TypeInfo == nil { + if r.parseableType == nil || !r.parseableType.IsValid() { klog.Warningf("type info not known for %v", gvk) } if scope.Name() == meta.RESTScopeNameNamespace { - r.API.Namespaced = true + r.api.Namespaced = true } s.schema.resources = append(s.schema.resources, r) @@ -287,31 +281,40 @@ func (s *MemoryStorage) AllResources() []metav1.APIResource { var ret []metav1.APIResource for _, resource := range s.schema.resources { - ret = append(ret, resource.API) + ret = append(ret, resource.api) } return ret } -func (s *MemoryStorage) FindResource(gr schema.GroupResource) *ResourceInfo { +func (s *MemoryStorage) FindResource(gr schema.GroupResource) storage.ResourceInfo { s.schemaMutex.Lock() defer s.schemaMutex.Unlock() for _, resource := range s.schema.resources { - if resource.GVR.GroupResource() == gr { + if resource.gvr.GroupResource() == gr { return resource } } return nil } -func (s *MemoryStorage) findResourceByGVK(gvk schema.GroupVersionKind) *ResourceInfo { +func (s *MemoryStorage) findResourceByGVK(gvk schema.GroupVersionKind) storage.ResourceInfo { s.schemaMutex.Lock() defer s.schemaMutex.Unlock() for _, resource := range s.schema.resources { - if resource.GVK == gvk { + if resource.gvk == gvk { return resource } } return nil } + +func (s *MemoryStorage) fireOnWatchEvent(ev *storage.WatchEvent) { + s.hooksMutex.Lock() + defer s.hooksMutex.Unlock() + + for _, hook := range s.hooks { + hook.OnWatchEvent(ev) + } +} diff --git a/mockkubeapiserver/storage/memorystorage/memorystorage_watch.go b/mockkubeapiserver/storage/memorystorage/memorystorage_watch.go new file mode 100644 index 00000000..20672a7d --- /dev/null +++ b/mockkubeapiserver/storage/memorystorage/memorystorage_watch.go @@ -0,0 +1,104 @@ +package memorystorage + +import ( + "context" + "sync" + + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/klog/v2" + + "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver/storage" +) + +func (resource *memoryResourceInfo) Watch(ctx context.Context, opt storage.WatchOptions, callback storage.WatchCallback) error { + return resource.storage.watch(ctx, resource.gvk, opt, callback) +} + +type resourceStorage struct { + parent *MemoryStorage + GroupResource schema.GroupResource + + mutex sync.Mutex + watches []*watch + + objects map[types.NamespacedName]*unstructured.Unstructured +} + +type watch struct { + callback storage.WatchCallback + opt storage.WatchOptions + errChan chan error +} + +func (r *resourceStorage) watch(ctx context.Context, gvk schema.GroupVersionKind, opt storage.WatchOptions, callback storage.WatchCallback) error { + w := &watch{ + callback: callback, + opt: opt, + errChan: make(chan error), + } + + r.mutex.Lock() + pos := -1 + for i := range r.watches { + if r.watches[i] == nil { + r.watches[i] = w + pos = i + break + } + } + if pos == -1 { + r.watches = append(r.watches, w) + pos = len(r.watches) - 1 + } + r.mutex.Unlock() + + // TODO: Delay / buffer watch notifications until after the list + + // TODO: Only send list if no rv specified? + + r.mutex.Lock() + for _, obj := range r.objects { + if opt.Namespace != "" { + if obj.GetNamespace() != opt.Namespace { + continue + } + } + + ev := storage.BuildWatchEvent(gvk, "ADDED", obj) + if err := w.callback(ev); err != nil { + klog.Warningf("error sending backfill watch notification; stopping watch: %v", err) + + // remove watch from list + r.watches[pos] = nil + + return err + } + } + r.mutex.Unlock() + + return <-w.errChan +} + +func (r *resourceStorage) broadcastEventHoldingLock(ctx context.Context, gvk schema.GroupVersionKind, evType string, u *unstructured.Unstructured) { + ev := storage.BuildWatchEvent(gvk, evType, u) + + r.parent.fireOnWatchEvent(ev) + + // r.mutex should be locked + for i := range r.watches { + w := r.watches[i] + if w == nil { + continue + } + if w.opt.Namespace != "" && ev.Namespace != w.opt.Namespace { + continue + } + if err := w.callback(ev); err != nil { + klog.Warningf("error sending watch notification; stopping watch: %v", err) + w.errChan <- err + r.watches[i] = nil + } + } +} diff --git a/mockkubeapiserver/storage/memorystorage/resourceinfo.go b/mockkubeapiserver/storage/memorystorage/resourceinfo.go new file mode 100644 index 00000000..713d3239 --- /dev/null +++ b/mockkubeapiserver/storage/memorystorage/resourceinfo.go @@ -0,0 +1,35 @@ +package memorystorage + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver/storage" + "sigs.k8s.io/structured-merge-diff/v4/typed" +) + +type memoryResourceInfo struct { + api metav1.APIResource + gvr schema.GroupVersionResource + gvk schema.GroupVersionKind + listGVK schema.GroupVersionKind + + parseableType *typed.ParseableType + + parent *MemoryStorage + + storage *resourceStorage +} + +var _ storage.ResourceInfo = &memoryResourceInfo{} + +func (r *memoryResourceInfo) GVK() schema.GroupVersionKind { + return r.gvk +} + +func (r *memoryResourceInfo) ListGVK() schema.GroupVersionKind { + return r.listGVK +} + +func (r *memoryResourceInfo) ParseableType() *typed.ParseableType { + return r.parseableType +} diff --git a/mockkubeapiserver/storage/memorystorage/schema.go b/mockkubeapiserver/storage/memorystorage/schema.go new file mode 100644 index 00000000..16c46f8d --- /dev/null +++ b/mockkubeapiserver/storage/memorystorage/schema.go @@ -0,0 +1,19 @@ +package memorystorage + +import ( + "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver/schemas" +) + +type mockSchema struct { + builtin *schemas.Schema + resources []*memoryResourceInfo +} + +func (s *mockSchema) Init() error { + schema, err := schemas.KubernetesBuiltInSchema() + if err != nil { + return err + } + s.builtin = schema + return nil +} diff --git a/mockkubeapiserver/schema_test.go b/mockkubeapiserver/storage/memorystorage/schema_test.go similarity index 83% rename from mockkubeapiserver/schema_test.go rename to mockkubeapiserver/storage/memorystorage/schema_test.go index 81ef6126..b1fe1094 100644 --- a/mockkubeapiserver/schema_test.go +++ b/mockkubeapiserver/storage/memorystorage/schema_test.go @@ -1,4 +1,4 @@ -package mockkubeapiserver +package memorystorage import ( "context" @@ -9,6 +9,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime/schema" + "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver/storage" "sigs.k8s.io/yaml" ) @@ -16,12 +17,12 @@ func TestApply(t *testing.T) { ctx := context.TODO() gvk := schema.GroupVersionKind{Version: "v1", Kind: "ConfigMap"} - storage, err := NewMemoryStorage(NewTestClock(), NewTestUIDGenerator()) + memoryStorage, err := NewMemoryStorage(storage.NewTestClock(), storage.NewTestUIDGenerator()) if err != nil { t.Fatalf("NewMemoryStorage failed: %v", err) } - resource := storage.findResourceByGVK(gvk) + resource := memoryStorage.findResourceByGVK(gvk) if resource == nil { t.Fatalf("findResourceByGVK(%v) unexpectedly returned nil", gvk) } @@ -55,7 +56,7 @@ data: FieldManager: "foo", } - mergedObject, changed, err := resource.DoServerSideApply(ctx, liveObj, []byte(patchYAML), applyOptions) + mergedObject, changed, err := storage.DoServerSideApply(ctx, resource, liveObj, []byte(patchYAML), applyOptions) if err != nil { t.Fatalf("DoServerSideApply gave error: %v", err) } diff --git a/mockkubeapiserver/schema.go b/mockkubeapiserver/storage/resourceinfo.go similarity index 53% rename from mockkubeapiserver/schema.go rename to mockkubeapiserver/storage/resourceinfo.go index 6972f7e0..33322382 100644 --- a/mockkubeapiserver/schema.go +++ b/mockkubeapiserver/storage/resourceinfo.go @@ -1,4 +1,4 @@ -package mockkubeapiserver +package storage import ( "context" @@ -7,44 +7,53 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver/forked" "sigs.k8s.io/structured-merge-diff/v4/fieldpath" "sigs.k8s.io/structured-merge-diff/v4/merge" "sigs.k8s.io/structured-merge-diff/v4/typed" - - "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver/forked" ) -type mockSchema struct { - builtin *Schema - resources []*ResourceInfo +// ResourceInfo exposes the storage for a particular resource (group-kind), +// supporting CRUD operations for accessing the objects of that kind. +type ResourceInfo interface { + GVK() schema.GroupVersionKind + ListGVK() schema.GroupVersionKind + ParseableType() *typed.ParseableType + + GetObject(ctx context.Context, id types.NamespacedName) (*unstructured.Unstructured, bool, error) + + ListObjects(ctx context.Context, filter ListFilter) (*unstructured.UnstructuredList, error) + Watch(ctx context.Context, opt WatchOptions, callback WatchCallback) error + + CreateObject(ctx context.Context, id types.NamespacedName, u *unstructured.Unstructured) error + UpdateObject(ctx context.Context, id types.NamespacedName, u *unstructured.Unstructured) error + DeleteObject(ctx context.Context, id types.NamespacedName) (*unstructured.Unstructured, error) } -func (s *mockSchema) Init() error { - schema, err := KubernetesBuiltInSchema() - if err != nil { - return err - } - s.builtin = schema - return nil +type ListFilter struct { + Namespace string } -type typeInfo struct { - ParserType typed.ParseableType +type WatchOptions struct { + Namespace string } -func (r *ResourceInfo) DoServerSideApply(ctx context.Context, live *unstructured.Unstructured, patchYAML []byte, options metav1.PatchOptions) (*unstructured.Unstructured, bool, error) { - if r.TypeInfo == nil { - return nil, false, fmt.Errorf("no type info for %v", r.GVK) +func DoServerSideApply(ctx context.Context, r ResourceInfo, live *unstructured.Unstructured, patchYAML []byte, options metav1.PatchOptions) (*unstructured.Unstructured, bool, error) { + parserType := r.ParseableType() + if parserType == nil || !parserType.IsValid() { + return nil, false, fmt.Errorf("no type info for %v", r.GVK()) } updater := merge.Updater{} - liveObject, err := r.TypeInfo.ParserType.FromUnstructured(live.Object) + liveObject, err := parserType.FromUnstructured(live.Object) if err != nil { return nil, false, fmt.Errorf("error parsing live object: %w", err) } - configObject, err := r.TypeInfo.ParserType.FromYAML(typed.YAMLObject(patchYAML)) + configObject, err := parserType.FromYAML(typed.YAMLObject(patchYAML)) if err != nil { return nil, false, fmt.Errorf("error parsing patch object: %w", err) } @@ -63,7 +72,7 @@ func (r *ResourceInfo) DoServerSideApply(ctx context.Context, live *unstructured return nil, false, fmt.Errorf("error encoding manager: %w", err) } - apiVersion := fieldpath.APIVersion(r.GVK.GroupVersion().String()) + apiVersion := fieldpath.APIVersion(r.GVK().GroupVersion().String()) mergedObject, newManagers, err := updater.Apply(liveObject, configObject, apiVersion, managers, string(managerJSON), force) if err != nil { return nil, false, fmt.Errorf("error applying patch: %w", err) diff --git a/mockkubeapiserver/uid.go b/mockkubeapiserver/storage/uid.go similarity index 96% rename from mockkubeapiserver/uid.go rename to mockkubeapiserver/storage/uid.go index 73ca0059..7d6d3f0a 100644 --- a/mockkubeapiserver/uid.go +++ b/mockkubeapiserver/storage/uid.go @@ -1,4 +1,4 @@ -package mockkubeapiserver +package storage import ( "fmt" diff --git a/mockkubeapiserver/storage/watchevent.go b/mockkubeapiserver/storage/watchevent.go new file mode 100644 index 00000000..d3486fd7 --- /dev/null +++ b/mockkubeapiserver/storage/watchevent.go @@ -0,0 +1,116 @@ +package storage + +import ( + "encoding/json" + "sync" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/klog/v2" +) + +type WatchEvent struct { + gvk schema.GroupVersionKind + internalObject *unstructured.Unstructured + eventType string + + Namespace string + + mutex sync.Mutex + partialObjectMetadataJSON []byte + json []byte +} + +type messageV1 struct { + Type string `json:"type"` + Object runtime.Object `json:"object"` +} + +func BuildWatchEvent(gvk schema.GroupVersionKind, evType string, u *unstructured.Unstructured) *WatchEvent { + ev := &WatchEvent{ + gvk: gvk, + internalObject: u, + eventType: evType, + Namespace: u.GetNamespace(), + } + return ev +} + +func (ev *WatchEvent) GroupKind() schema.GroupKind { + return ev.gvk.GroupKind() +} + +func (ev *WatchEvent) Unstructured() *unstructured.Unstructured { + return ev.internalObject +} + +func (ev *WatchEvent) JSON() []byte { + ev.mutex.Lock() + defer ev.mutex.Unlock() + + if ev.json != nil { + return ev.json + } + u := ev.internalObject + + msg := messageV1{ + Type: ev.eventType, + Object: u, + } + + j, err := json.Marshal(&msg) + if err != nil { + klog.Fatalf("error from json.Marshal(%T): %v", &msg, err) + } + + j = append(j, byte('\n')) + ev.json = j + + return j +} + +// Constructs the message for a PartialObjectMetadata response +func (ev *WatchEvent) PartialObjectMetadataJSON() []byte { + ev.mutex.Lock() + defer ev.mutex.Unlock() + + if ev.partialObjectMetadataJSON != nil { + return ev.partialObjectMetadataJSON + } + u := ev.internalObject + + partialObjectMetadata := &metav1.PartialObjectMetadata{} + partialObjectMetadata.APIVersion = u.GetAPIVersion() + partialObjectMetadata.Kind = u.GetKind() + + partialObjectMetadata.APIVersion = "meta.k8s.io/v1beta1" + partialObjectMetadata.Kind = "PartialObjectMetadata" + // {"kind":"PartialObjectMetadata","apiVersion":"meta.k8s.io/v1beta1","metadata"": + + partialObjectMetadata.Annotations = u.GetAnnotations() + partialObjectMetadata.Labels = u.GetLabels() + partialObjectMetadata.Name = u.GetName() + partialObjectMetadata.Namespace = u.GetNamespace() + partialObjectMetadata.ResourceVersion = u.GetResourceVersion() + partialObjectMetadata.Generation = u.GetGeneration() + partialObjectMetadata.CreationTimestamp = u.GetCreationTimestamp() + partialObjectMetadata.DeletionTimestamp = u.GetDeletionTimestamp() + partialObjectMetadata.DeletionGracePeriodSeconds = u.GetDeletionGracePeriodSeconds() + partialObjectMetadata.GenerateName = u.GetGenerateName() + + msg := messageV1{ + Type: ev.eventType, + Object: partialObjectMetadata, + } + + j, err := json.Marshal(&msg) + if err != nil { + klog.Fatalf("error from json.Marshal(%T): %v", &msg, err) + } + + j = append(j, byte('\n')) + ev.partialObjectMetadataJSON = j + return j +} diff --git a/mockkubeapiserver/tools/generate-typeinfo/main.go b/mockkubeapiserver/tools/generate-typeinfo/main.go index 0d738d89..88f3384e 100644 --- a/mockkubeapiserver/tools/generate-typeinfo/main.go +++ b/mockkubeapiserver/tools/generate-typeinfo/main.go @@ -9,7 +9,7 @@ import ( "strings" "k8s.io/apimachinery/pkg/api/meta" - "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver" + "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver/schemas" "sigs.k8s.io/yaml" ) @@ -62,10 +62,10 @@ func run(ctx context.Context) error { return fmt.Errorf("error parsing %q: %w", p, err) } - schemaMeta := &mockkubeapiserver.SchemaMeta{} + schemaMeta := &schemas.SchemaMeta{} // Go through the paths to determine if resources are cluster or namespace scoped. We look at the "list" endpoint. - pathInfo := make(map[openapiGVK]mockkubeapiserver.SchemaMetaResource) + pathInfo := make(map[openapiGVK]schemas.SchemaMetaResource) for url, path := range schema.Paths { if path.Get == nil { continue @@ -131,7 +131,7 @@ func run(ctx context.Context) error { } return fmt.Errorf("key %q, gvk %#v not found in paths", k, gvk) } - resource := mockkubeapiserver.SchemaMetaResource{ + resource := schemas.SchemaMetaResource{ Group: gvk.Group, Version: gvk.Version, Kind: gvk.Kind, diff --git a/pkg/test/httprecorder/request_log.go b/pkg/test/httprecorder/request_log.go index 0b05c175..01df2dcc 100644 --- a/pkg/test/httprecorder/request_log.go +++ b/pkg/test/httprecorder/request_log.go @@ -9,10 +9,10 @@ import ( "sort" "strings" "sync" + "time" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/klog/v2" - "sigs.k8s.io/kubebuilder-declarative-pattern/mockkubeapiserver" "sigs.k8s.io/yaml" ) @@ -93,8 +93,9 @@ func resetTimestamp(body string) string { conditions := status["conditions"].([]interface{}) for _, condition := range conditions { cond := condition.(map[string]interface{}) - // mockkubeapiserver provides a mock timestamp. - cond["lastTransitionTime"] = mockkubeapiserver.NewTestClock().Now().Format("2006-01-02T15:04:05Z07:00") + // Use a fixed timestamp for golden tests. + t := time.Date(2022, time.January, 1, 0, 0, 0, 0, time.UTC) + cond["lastTransitionTime"] = t.Format("2006-01-02T15:04:05Z07:00") } b, _ := json.Marshal(u) return string(b)