From bf8d84a624081787f753fa84f4b56db36e71f56e Mon Sep 17 00:00:00 2001 From: awgreene Date: Tue, 15 Dec 2020 13:36:49 -0500 Subject: [PATCH] Fix controllers and run codegen --- .../operators/adoption_controller.go | 73 +-- .../operators/adoption_controller_test.go | 6 +- .../operators/operator_controller.go | 22 +- .../operators/operator_controller_test.go | 11 +- .../operators/operatorcondition_controller.go | 2 +- .../operatorcondition_controller_test.go | 21 +- .../operatorconditiongenerator_controller.go | 10 +- ...ratorconditiongenerator_controller_test.go | 21 +- pkg/controller/operators/suite_test.go | 9 +- .../client/openapi/zz_generated.openapi.go | 498 ++++++++++++------ 10 files changed, 427 insertions(+), 246 deletions(-) diff --git a/pkg/controller/operators/adoption_controller.go b/pkg/controller/operators/adoption_controller.go index f255e111179..50a2bf20bdc 100644 --- a/pkg/controller/operators/adoption_controller.go +++ b/pkg/controller/operators/adoption_controller.go @@ -2,6 +2,7 @@ package operators import ( "context" + "fmt" "sync" "github.com/go-logr/logr" @@ -45,9 +46,7 @@ type AdoptionReconciler struct { // SetupWithManager adds the operator reconciler to the given controller manager. func (r *AdoptionReconciler) SetupWithManager(mgr ctrl.Manager) error { // Trigger operator events from the events of their compoenents. - enqueueSub := &handler.EnqueueRequestsFromMapFunc{ - ToRequests: handler.ToRequestsFunc(r.mapToSubscriptions), - } + enqueueSub := handler.EnqueueRequestsFromMapFunc(r.mapToSubscriptions) // Create multiple controllers for resource types that require automatic adoption err := ctrl.NewControllerManagedBy(mgr). @@ -60,12 +59,8 @@ func (r *AdoptionReconciler) SetupWithManager(mgr ctrl.Manager) error { } var ( - enqueueCSV = &handler.EnqueueRequestsFromMapFunc{ - ToRequests: handler.ToRequestsFunc(r.mapToClusterServiceVersions), - } - enqueueProviders = &handler.EnqueueRequestsFromMapFunc{ - ToRequests: handler.ToRequestsFunc(r.mapToProviders), - } + enqueueCSV = handler.EnqueueRequestsFromMapFunc(r.mapToClusterServiceVersions) + enqueueProviders = handler.EnqueueRequestsFromMapFunc(r.mapToProviders) ) err = ctrl.NewControllerManagedBy(mgr). For(&operatorsv1alpha1.ClusterServiceVersion{}). @@ -113,13 +108,12 @@ func NewAdoptionReconciler(cli client.Client, log logr.Logger, scheme *runtime.S } // ReconcileSubscription labels the CSVs installed by a Subscription as components of an operator named after the subscribed package and install namespace. -func (r *AdoptionReconciler) ReconcileSubscription(req ctrl.Request) (reconcile.Result, error) { +func (r *AdoptionReconciler) ReconcileSubscription(ctx context.Context, req ctrl.Request) (reconcile.Result, error) { // Set up a convenient log object so we don't have to type request over and over again log := r.log.WithValues("request", req) log.V(4).Info("reconciling subscription") // Fetch the Subscription from the cache - ctx := context.TODO() in := &operatorsv1alpha1.Subscription{} if err := r.Get(ctx, req.NamespacedName, in); err != nil { if apierrors.IsNotFound(err) { @@ -176,13 +170,12 @@ func (r *AdoptionReconciler) ReconcileSubscription(req ctrl.Request) (reconcile. } // ReconcileClusterServiceVersion projects the component labels of a given CSV onto all resources owned by it. -func (r *AdoptionReconciler) ReconcileClusterServiceVersion(req ctrl.Request) (reconcile.Result, error) { +func (r *AdoptionReconciler) ReconcileClusterServiceVersion(ctx context.Context, req ctrl.Request) (reconcile.Result, error) { // Set up a convenient log object so we don't have to type request over and over again log := r.log.WithValues("request", req) log.V(4).Info("reconciling csv") // Fetch the CSV from the cache - ctx := context.TODO() in := &operatorsv1alpha1.ClusterServiceVersion{} if err := r.Get(ctx, req.NamespacedName, in); err != nil { if apierrors.IsNotFound(err) { @@ -265,7 +258,12 @@ func (r *AdoptionReconciler) adopt(ctx context.Context, operator *decorators.Ope return nil } - if err := r.Get(ctx, types.NamespacedName{Namespace: m.GetNamespace(), Name: m.GetName()}, component); err != nil { + cObj, ok := component.(client.Object) + if !ok { + return fmt.Errorf("Unable to typecast runtime.Object to client.Object") + } + + if err := r.Get(ctx, types.NamespacedName{Namespace: m.GetNamespace(), Name: m.GetName()}, cObj); err != nil { if apierrors.IsNotFound(err) { r.log.Error(err, "component not found") err = nil @@ -273,7 +271,7 @@ func (r *AdoptionReconciler) adopt(ctx context.Context, operator *decorators.Ope return err } - candidate := component.DeepCopyObject() + candidate := cObj.DeepCopyObject() adopted, err := operator.AdoptComponent(candidate) if err != nil { @@ -282,14 +280,21 @@ func (r *AdoptionReconciler) adopt(ctx context.Context, operator *decorators.Ope if adopted { // Only update if freshly adopted - r.log.Info("component adopted", "component", candidate) - return r.Patch(ctx, candidate, client.MergeFrom(component)) + pCObj, ok := candidate.(client.Object) + if !ok { + return fmt.Errorf("Unable to typecast runtime.Object to client.Object") + } + return r.Patch(ctx, pCObj, client.MergeFrom(cObj)) } return nil } func (r *AdoptionReconciler) disown(ctx context.Context, operator *decorators.Operator, component runtime.Object) error { + cObj, ok := component.(client.Object) + if !ok { + return fmt.Errorf("Unable to typecast runtime.Object to client.Object") + } candidate := component.DeepCopyObject() disowned, err := operator.DisownComponent(candidate) if err != nil { @@ -303,7 +308,11 @@ func (r *AdoptionReconciler) disown(ctx context.Context, operator *decorators.Op // Only update if freshly disowned r.log.V(4).Info("component disowned", "component", candidate) - return r.Patch(ctx, candidate, client.MergeFrom(component)) + uCObj, ok := candidate.(client.Object) + if !ok { + return fmt.Errorf("Unable to typecast runtime.Object to client.Object") + } + return r.Patch(ctx, uCObj, client.MergeFrom(cObj)) } func (r *AdoptionReconciler) adoptees(ctx context.Context, operator decorators.Operator, csv *operatorsv1alpha1.ClusterServiceVersion) ([]runtime.Object, error) { @@ -335,7 +344,11 @@ func (r *AdoptionReconciler) adoptees(ctx context.Context, operator decorators.O } opt := client.MatchingLabelsSelector{Selector: selector} for _, list := range componentLists { - if err := r.List(ctx, list, opt); err != nil { + cList, ok := list.(client.ObjectList) + if !ok { + return nil, fmt.Errorf("Unable to typecast runtime.Object to client.ObjectList") + } + if err := r.List(ctx, cList, opt); err != nil { return nil, err } } @@ -415,8 +428,8 @@ func (r *AdoptionReconciler) adoptInstallPlan(ctx context.Context, operator *dec return utilerrors.NewAggregate(errs) } -func (r *AdoptionReconciler) mapToSubscriptions(obj handler.MapObject) (requests []reconcile.Request) { - if obj.Meta == nil { +func (r *AdoptionReconciler) mapToSubscriptions(obj client.Object) (requests []reconcile.Request) { + if obj == nil { return } @@ -424,7 +437,7 @@ func (r *AdoptionReconciler) mapToSubscriptions(obj handler.MapObject) (requests // The Subscription reconciler will sort out the important changes ctx := context.TODO() subs := &operatorsv1alpha1.SubscriptionList{} - if err := r.List(ctx, subs, client.InNamespace(obj.Meta.GetNamespace())); err != nil { + if err := r.List(ctx, subs, client.InNamespace(obj.GetNamespace())); err != nil { r.log.Error(err, "error listing subscriptions") } @@ -444,15 +457,15 @@ func (r *AdoptionReconciler) mapToSubscriptions(obj handler.MapObject) (requests return } -func (r *AdoptionReconciler) mapToClusterServiceVersions(obj handler.MapObject) (requests []reconcile.Request) { - if obj.Meta == nil { +func (r *AdoptionReconciler) mapToClusterServiceVersions(obj client.Object) (requests []reconcile.Request) { + if obj == nil { return } // Get all owner CSV from owner labels if cluster scoped - namespace := obj.Meta.GetNamespace() + namespace := obj.GetNamespace() if namespace == metav1.NamespaceAll { - name, ns, ok := ownerutil.GetOwnerByKindLabel(obj.Meta, operatorsv1alpha1.ClusterServiceVersionKind) + name, ns, ok := ownerutil.GetOwnerByKindLabel(obj, operatorsv1alpha1.ClusterServiceVersionKind) if ok { nsn := types.NamespacedName{Namespace: ns, Name: name} requests = append(requests, reconcile.Request{NamespacedName: nsn}) @@ -461,7 +474,7 @@ func (r *AdoptionReconciler) mapToClusterServiceVersions(obj handler.MapObject) } // Get all owner CSVs from OwnerReferences - owners := ownerutil.GetOwnersByKind(obj.Meta, operatorsv1alpha1.ClusterServiceVersionKind) + owners := ownerutil.GetOwnersByKind(obj, operatorsv1alpha1.ClusterServiceVersionKind) for _, owner := range owners { nsn := types.NamespacedName{Namespace: namespace, Name: owner.Name} requests = append(requests, reconcile.Request{NamespacedName: nsn}) @@ -470,8 +483,8 @@ func (r *AdoptionReconciler) mapToClusterServiceVersions(obj handler.MapObject) return } -func (r *AdoptionReconciler) mapToProviders(obj handler.MapObject) (requests []reconcile.Request) { - if obj.Meta == nil { +func (r *AdoptionReconciler) mapToProviders(obj client.Object) (requests []reconcile.Request) { + if obj == nil { return nil } @@ -489,7 +502,7 @@ func (r *AdoptionReconciler) mapToProviders(obj handler.MapObject) (requests []r NamespacedName: types.NamespacedName{Namespace: csv.GetNamespace(), Name: csv.GetName()}, } for _, provided := range csv.Spec.CustomResourceDefinitions.Owned { - if provided.Name == obj.Meta.GetName() { + if provided.Name == obj.GetName() { requests = append(requests, request) break } diff --git a/pkg/controller/operators/adoption_controller_test.go b/pkg/controller/operators/adoption_controller_test.go index c27af0d876d..2c1505e1572 100644 --- a/pkg/controller/operators/adoption_controller_test.go +++ b/pkg/controller/operators/adoption_controller_test.go @@ -12,9 +12,9 @@ import ( apiextensionsv1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/tools/reference" apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" + "sigs.k8s.io/controller-runtime/pkg/client" operatorsv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1" "github.com/operator-framework/operator-lifecycle-manager/pkg/controller/operators/decorators" @@ -33,11 +33,11 @@ var _ = Describe("Adoption Controller", func() { Describe("Component label generation", func() { var ( - created []runtime.Object + created []client.Object ) BeforeEach(func() { - created = []runtime.Object{} + created = []client.Object{} }) JustAfterEach(func() { diff --git a/pkg/controller/operators/operator_controller.go b/pkg/controller/operators/operator_controller.go index d5494b34555..edfb27fd3ae 100644 --- a/pkg/controller/operators/operator_controller.go +++ b/pkg/controller/operators/operator_controller.go @@ -2,6 +2,7 @@ package operators import ( "context" + "fmt" "sync" "github.com/go-logr/logr" @@ -58,10 +59,7 @@ type OperatorReconciler struct { // SetupWithManager adds the operator reconciler to the given controller manager. func (r *OperatorReconciler) SetupWithManager(mgr ctrl.Manager) error { // Trigger operator events from the events of their compoenents. - enqueueOperator := &handler.EnqueueRequestsFromMapFunc{ - ToRequests: handler.ToRequestsFunc(r.mapComponentRequests), - } - + enqueueOperator := handler.EnqueueRequestsFromMapFunc(r.mapComponentRequests) // Note: If we want to support resources composed of custom resources, we need to figure out how // to dynamically add resource types to watch. return ctrl.NewControllerManagedBy(mgr). @@ -110,13 +108,12 @@ func NewOperatorReconciler(cli client.Client, log logr.Logger, scheme *runtime.S // Implement reconcile.Reconciler so the controller can reconcile objects var _ reconcile.Reconciler = &OperatorReconciler{} -func (r *OperatorReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { +func (r *OperatorReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { // Set up a convenient log object so we don't have to type request over and over again log := r.log.WithValues("request", req) log.V(1).Info("reconciling operator") // Get the Operator - ctx := context.TODO() create := false name := req.NamespacedName.Name in := &operatorsv1.Operator{} @@ -210,7 +207,11 @@ func (r *OperatorReconciler) listComponents(ctx context.Context, selector labels opt := client.MatchingLabelsSelector{Selector: selector} for _, list := range componentLists { - if err := r.List(ctx, list, opt); err != nil { + cList, ok := list.(client.ObjectList) + if !ok { + return nil, fmt.Errorf("Unable to typecast runtime.Object to client.ObjectList") + } + if err := r.List(ctx, cList, opt); err != nil { return nil, err } } @@ -245,13 +246,14 @@ func (r *OperatorReconciler) unsetLastResourceVersion(name types.NamespacedName) delete(r.lastResourceVersion, name) } -func (r *OperatorReconciler) mapComponentRequests(obj handler.MapObject) []reconcile.Request { +func (r *OperatorReconciler) mapComponentRequests(obj client.Object) []reconcile.Request { var requests []reconcile.Request - if obj.Meta == nil { + if obj == nil { return requests } - for _, name := range decorators.OperatorNames(obj.Meta.GetLabels()) { + labels := decorators.OperatorNames(obj.GetLabels()) + for _, name := range labels { // unset the last recorded resource version so the Operator will reconcile r.unsetLastResourceVersion(name) requests = append(requests, reconcile.Request{NamespacedName: name}) diff --git a/pkg/controller/operators/operator_controller_test.go b/pkg/controller/operators/operator_controller_test.go index b6c402fefae..296db1f5370 100644 --- a/pkg/controller/operators/operator_controller_test.go +++ b/pkg/controller/operators/operator_controller_test.go @@ -10,6 +10,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" + "sigs.k8s.io/controller-runtime/pkg/client" operatorsv1 "github.com/operator-framework/api/pkg/operators/v1" "github.com/operator-framework/operator-lifecycle-manager/pkg/controller/operators/decorators" @@ -83,7 +84,7 @@ var _ = Describe("Operator Controller", func() { ) for _, obj := range objs { - Expect(k8sClient.Create(ctx, obj)).To(Succeed()) + Expect(k8sClient.Create(ctx, obj.(client.Object))).To(Succeed()) } expectedRefs = toRefs(scheme, objs...) @@ -91,8 +92,8 @@ var _ = Describe("Operator Controller", func() { AfterEach(func() { for _, obj := range objs { - Expect(k8sClient.Get(ctx, testobj.NamespacedName(obj), obj)).To(Succeed()) - Expect(k8sClient.Delete(ctx, obj, deleteOpts)).To(Succeed()) + Expect(k8sClient.Get(ctx, testobj.NamespacedName(obj), obj.(client.Object))).To(Succeed()) + Expect(k8sClient.Delete(ctx, obj.(client.Object), deleteOpts)).To(Succeed()) } }) @@ -125,7 +126,7 @@ var _ = Describe("Operator Controller", func() { ) for _, obj := range newObjs { - Expect(k8sClient.Create(ctx, obj)).To(Succeed()) + Expect(k8sClient.Create(ctx, obj.(client.Object))).To(Succeed()) } objs = append(objs, newObjs...) @@ -143,7 +144,7 @@ var _ = Describe("Operator Controller", func() { Context("when component labels are removed", func() { BeforeEach(func() { for _, obj := range testobj.StripLabel(expectedKey, objs...) { - Expect(k8sClient.Update(ctx, obj)).To(Succeed()) + Expect(k8sClient.Update(ctx, obj.(client.Object))).To(Succeed()) } }) diff --git a/pkg/controller/operators/operatorcondition_controller.go b/pkg/controller/operators/operatorcondition_controller.go index a403400e6ee..0ca82a72224 100644 --- a/pkg/controller/operators/operatorcondition_controller.go +++ b/pkg/controller/operators/operatorcondition_controller.go @@ -66,7 +66,7 @@ func NewOperatorConditionReconciler(cli client.Client, log logr.Logger, scheme * // Implement reconcile.Reconciler so the controller can reconcile objects var _ reconcile.Reconciler = &OperatorConditionReconciler{} -func (r *OperatorConditionReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { +func (r *OperatorConditionReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { // Set up a convenient log object so we don't have to type request over and over again log := r.log.WithValues("request", req) log.V(2).Info("reconciling operatorcondition") diff --git a/pkg/controller/operators/operatorcondition_controller_test.go b/pkg/controller/operators/operatorcondition_controller_test.go index 75370236473..4da2fea954e 100644 --- a/pkg/controller/operators/operatorcondition_controller_test.go +++ b/pkg/controller/operators/operatorcondition_controller_test.go @@ -7,7 +7,6 @@ import ( . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" operatorsv1 "github.com/operator-framework/api/pkg/operators/v1" - "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/testobj" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" @@ -46,17 +45,21 @@ var _ = Describe("OperatorCondition", func() { Context("The OperatorCondition Reconciler", func() { var ( ctx context.Context - namespace string - namespacedName types.NamespacedName operatorCondition *operatorsv1.OperatorCondition + namespace *corev1.Namespace + namespacedName types.NamespacedName ) BeforeEach(func() { ctx = context.Background() - namespace = genName("ns-") - Expect(k8sClient.Create(ctx, testobj.WithName(namespace, &corev1.Namespace{}))).To(Succeed()) + namespace = &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: genName("ns-"), + }, + } + Expect(k8sClient.Create(ctx, namespace)).To(Succeed()) - namespacedName = types.NamespacedName{Name: "test", Namespace: namespace} + namespacedName = types.NamespacedName{Name: "test", Namespace: namespace.GetName()} // Create the deployment labels := map[string]string{ @@ -64,7 +67,7 @@ var _ = Describe("OperatorCondition", func() { } deployment := &appsv1.Deployment{ObjectMeta: metav1.ObjectMeta{ Name: "deployment", - Namespace: namespacedName.Namespace, + Namespace: namespace.GetName(), }, Spec: appsv1.DeploymentSpec{ Selector: &metav1.LabelSelector{ @@ -73,7 +76,7 @@ var _ = Describe("OperatorCondition", func() { Template: corev1.PodTemplateSpec{ ObjectMeta: metav1.ObjectMeta{ GenerateName: "nginx-", - Namespace: namespacedName.Namespace, + Namespace: namespace.GetName(), Labels: labels, }, Spec: corev1.PodSpec{ @@ -188,7 +191,7 @@ var _ = Describe("OperatorCondition", func() { It("appends the OPERATOR_CONDITION_NAME environment variable to the containers in the deployments", func() { deployment := &appsv1.Deployment{} Eventually(func() error { - err := k8sClient.Get(ctx, types.NamespacedName{Name: operatorCondition.Spec.Deployments[0], Namespace: namespace}, deployment) + err := k8sClient.Get(ctx, types.NamespacedName{Name: operatorCondition.Spec.Deployments[0], Namespace: namespace.GetName()}, deployment) if err != nil { return err } diff --git a/pkg/controller/operators/operatorconditiongenerator_controller.go b/pkg/controller/operators/operatorconditiongenerator_controller.go index 3c5bcaac896..bab47ccdf3c 100644 --- a/pkg/controller/operators/operatorconditiongenerator_controller.go +++ b/pkg/controller/operators/operatorconditiongenerator_controller.go @@ -39,25 +39,25 @@ func (r *OperatorConditionGeneratorReconciler) SetupWithManager(mgr ctrl.Manager } p := predicate.Funcs{ CreateFunc: func(e event.CreateEvent) bool { - if _, ok := e.Meta.GetLabels()[operatorsv1alpha1.CopiedLabelKey]; ok { + if _, ok := e.Object.GetLabels()[operatorsv1alpha1.CopiedLabelKey]; ok { return false } return true }, DeleteFunc: func(e event.DeleteEvent) bool { - if _, ok := e.Meta.GetLabels()[operatorsv1alpha1.CopiedLabelKey]; ok { + if _, ok := e.Object.GetLabels()[operatorsv1alpha1.CopiedLabelKey]; ok { return false } return true }, UpdateFunc: func(e event.UpdateEvent) bool { - if _, ok := e.MetaOld.GetLabels()[operatorsv1alpha1.CopiedLabelKey]; ok { + if _, ok := e.ObjectOld.GetLabels()[operatorsv1alpha1.CopiedLabelKey]; ok { return false } return true }, GenericFunc: func(e event.GenericEvent) bool { - if _, ok := e.Meta.GetLabels()[operatorsv1alpha1.CopiedLabelKey]; ok { + if _, ok := e.Object.GetLabels()[operatorsv1alpha1.CopiedLabelKey]; ok { return false } return true @@ -87,7 +87,7 @@ func NewOperatorConditionGeneratorReconciler(cli client.Client, log logr.Logger, // Implement reconcile.Reconciler so the controller can reconcile objects var _ reconcile.Reconciler = &OperatorConditionGeneratorReconciler{} -func (r *OperatorConditionGeneratorReconciler) Reconcile(req ctrl.Request) (ctrl.Result, error) { +func (r *OperatorConditionGeneratorReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { // Set up a convenient log object so we don't have to type request over and over again log := r.log.WithValues("request", req) diff --git a/pkg/controller/operators/operatorconditiongenerator_controller_test.go b/pkg/controller/operators/operatorconditiongenerator_controller_test.go index bf4f8150e1a..f990031ffd3 100644 --- a/pkg/controller/operators/operatorconditiongenerator_controller_test.go +++ b/pkg/controller/operators/operatorconditiongenerator_controller_test.go @@ -11,13 +11,11 @@ import ( k8serrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/types" - "k8s.io/apiserver/pkg/storage/names" . "github.com/onsi/ginkgo" . "github.com/onsi/gomega" operatorsv1 "github.com/operator-framework/api/pkg/operators/v1" operatorsv1alpha1 "github.com/operator-framework/api/pkg/operators/v1alpha1" - "github.com/operator-framework/operator-lifecycle-manager/pkg/lib/testobj" ) var _ = Describe("The OperatorConditionsGenerator Controller", func() { @@ -26,18 +24,19 @@ var _ = Describe("The OperatorConditionsGenerator Controller", func() { interval = time.Millisecond * 100 ) - var ( - genName = names.SimpleNameGenerator.GenerateName - ) var ( ctx context.Context - namespace string + namespace *corev1.Namespace ) BeforeEach(func() { ctx = context.Background() - namespace = genName("ns-") - Expect(k8sClient.Create(ctx, testobj.WithName(namespace, &corev1.Namespace{}))).To(Succeed()) + namespace = &corev1.Namespace{ + ObjectMeta: metav1.ObjectMeta{ + Name: genName("ns-"), + }, + } + Expect(k8sClient.Create(ctx, namespace)).To(Succeed()) }) It("creates an OperatorCondition for a CSV without a ServiceAccount", func() { @@ -49,7 +48,7 @@ var _ = Describe("The OperatorConditionsGenerator Controller", func() { }, ObjectMeta: metav1.ObjectMeta{ Name: genName("csv-"), - Namespace: namespace, + Namespace: namespace.GetName(), }, Spec: operatorsv1alpha1.ClusterServiceVersionSpec{ InstallModes: []operatorsv1alpha1.InstallMode{ @@ -109,7 +108,7 @@ var _ = Describe("The OperatorConditionsGenerator Controller", func() { }, ObjectMeta: metav1.ObjectMeta{ Name: genName("csv-"), - Namespace: namespace, + Namespace: namespace.GetName(), Labels: map[string]string{ operatorsv1alpha1.CopiedLabelKey: "", }, @@ -160,7 +159,7 @@ var _ = Describe("The OperatorConditionsGenerator Controller", func() { }, ObjectMeta: metav1.ObjectMeta{ Name: genName("csv-"), - Namespace: namespace, + Namespace: namespace.GetName(), }, Spec: operatorsv1alpha1.ClusterServiceVersionSpec{ InstallModes: []operatorsv1alpha1.InstallMode{ diff --git a/pkg/controller/operators/suite_test.go b/pkg/controller/operators/suite_test.go index 5c1d74fc042..3c85cbc7b0d 100644 --- a/pkg/controller/operators/suite_test.go +++ b/pkg/controller/operators/suite_test.go @@ -1,6 +1,7 @@ package operators import ( + "context" "fmt" "testing" "time" @@ -45,7 +46,7 @@ var ( cfg *rest.Config k8sClient client.Client testEnv *envtest.Environment - stop chan struct{} + ctx context.Context scheme = runtime.NewScheme() gracePeriod int64 = 0 @@ -88,7 +89,7 @@ var _ = BeforeSuite(func() { useExisting := false testEnv = &envtest.Environment{ UseExistingCluster: &useExisting, - CRDs: []runtime.Object{ + CRDs: []client.Object{ crds.CatalogSource(), crds.ClusterServiceVersion(), crds.InstallPlan(), @@ -144,7 +145,7 @@ var _ = BeforeSuite(func() { Expect(operatorConditionReconciler.SetupWithManager(mgr)).ToNot(HaveOccurred()) Expect(operatorConditionGeneratorReconciler.SetupWithManager(mgr)).ToNot(HaveOccurred()) - stop = make(chan struct{}) + ctx = ctrl.SetupSignalHandler() go func() { defer GinkgoRecover() @@ -161,7 +162,7 @@ var _ = BeforeSuite(func() { var _ = AfterSuite(func() { By("stopping the controller manager") - close(stop) + ctx.Done() By("tearing down the test environment") err := testEnv.Stop() diff --git a/pkg/package-server/client/openapi/zz_generated.openapi.go b/pkg/package-server/client/openapi/zz_generated.openapi.go index afcc17d041c..a425e0d4fa7 100644 --- a/pkg/package-server/client/openapi/zz_generated.openapi.go +++ b/pkg/package-server/client/openapi/zz_generated.openapi.go @@ -127,20 +127,23 @@ func schema_api_pkg_operators_v1alpha1_APIResourceReference(ref common.Reference Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "version": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -163,7 +166,8 @@ func schema_api_pkg_operators_v1alpha1_APIServiceDefinitions(ref common.Referenc Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.APIServiceDescription"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.APIServiceDescription"), }, }, }, @@ -175,7 +179,8 @@ func schema_api_pkg_operators_v1alpha1_APIServiceDefinitions(ref common.Referenc Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.APIServiceDescription"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.APIServiceDescription"), }, }, }, @@ -198,26 +203,30 @@ func schema_api_pkg_operators_v1alpha1_APIServiceDescription(ref common.Referenc Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "group": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "version": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "deploymentName": { @@ -250,7 +259,8 @@ func schema_api_pkg_operators_v1alpha1_APIServiceDescription(ref common.Referenc Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.APIResourceReference"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.APIResourceReference"), }, }, }, @@ -262,7 +272,8 @@ func schema_api_pkg_operators_v1alpha1_APIServiceDescription(ref common.Referenc Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.StatusDescriptor"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.StatusDescriptor"), }, }, }, @@ -274,7 +285,8 @@ func schema_api_pkg_operators_v1alpha1_APIServiceDescription(ref common.Referenc Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.SpecDescriptor"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.SpecDescriptor"), }, }, }, @@ -286,7 +298,8 @@ func schema_api_pkg_operators_v1alpha1_APIServiceDescription(ref common.Referenc Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.ActionDescriptor"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.ActionDescriptor"), }, }, }, @@ -310,8 +323,9 @@ func schema_api_pkg_operators_v1alpha1_ActionDescriptor(ref common.ReferenceCall Properties: map[string]spec.Schema{ "path": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "displayName": { @@ -332,8 +346,9 @@ func schema_api_pkg_operators_v1alpha1_ActionDescriptor(ref common.ReferenceCall Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -361,20 +376,23 @@ func schema_api_pkg_operators_v1alpha1_CRDDescription(ref common.ReferenceCallba Properties: map[string]spec.Schema{ "name": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "version": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "displayName": { @@ -395,7 +413,8 @@ func schema_api_pkg_operators_v1alpha1_CRDDescription(ref common.ReferenceCallba Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.APIResourceReference"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.APIResourceReference"), }, }, }, @@ -407,7 +426,8 @@ func schema_api_pkg_operators_v1alpha1_CRDDescription(ref common.ReferenceCallba Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.StatusDescriptor"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.StatusDescriptor"), }, }, }, @@ -419,7 +439,8 @@ func schema_api_pkg_operators_v1alpha1_CRDDescription(ref common.ReferenceCallba Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.SpecDescriptor"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.SpecDescriptor"), }, }, }, @@ -431,7 +452,8 @@ func schema_api_pkg_operators_v1alpha1_CRDDescription(ref common.ReferenceCallba Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.ActionDescriptor"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.ActionDescriptor"), }, }, }, @@ -459,7 +481,8 @@ func schema_api_pkg_operators_v1alpha1_CustomResourceDefinitions(ref common.Refe Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.CRDDescription"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.CRDDescription"), }, }, }, @@ -471,7 +494,8 @@ func schema_api_pkg_operators_v1alpha1_CustomResourceDefinitions(ref common.Refe Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.CRDDescription"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.CRDDescription"), }, }, }, @@ -494,14 +518,16 @@ func schema_api_pkg_operators_v1alpha1_InstallMode(ref common.ReferenceCallback) Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "supported": { SchemaProps: spec.SchemaProps{ - Type: []string{"boolean"}, - Format: "", + Default: false, + Type: []string{"boolean"}, + Format: "", }, }, }, @@ -520,8 +546,9 @@ func schema_api_pkg_operators_v1alpha1_SpecDescriptor(ref common.ReferenceCallba Properties: map[string]spec.Schema{ "path": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "displayName": { @@ -542,8 +569,9 @@ func schema_api_pkg_operators_v1alpha1_SpecDescriptor(ref common.ReferenceCallba Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -571,8 +599,9 @@ func schema_api_pkg_operators_v1alpha1_StatusDescriptor(ref common.ReferenceCall Properties: map[string]spec.Schema{ "path": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "displayName": { @@ -593,8 +622,9 @@ func schema_api_pkg_operators_v1alpha1_StatusDescriptor(ref common.ReferenceCall Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -622,14 +652,16 @@ func schema_api_pkg_operators_v1alpha1_WebhookDescription(ref common.ReferenceCa Properties: map[string]spec.Schema{ "generateName": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "type": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "deploymentName": { @@ -655,7 +687,8 @@ func schema_api_pkg_operators_v1alpha1_WebhookDescription(ref common.ReferenceCa Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/api/admissionregistration/v1.RuleWithOperations"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/api/admissionregistration/v1.RuleWithOperations"), }, }, }, @@ -696,8 +729,9 @@ func schema_api_pkg_operators_v1alpha1_WebhookDescription(ref common.ReferenceCa Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -721,8 +755,9 @@ func schema_api_pkg_operators_v1alpha1_WebhookDescription(ref common.ReferenceCa Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -788,7 +823,8 @@ func schema_package_server_apis_operators_v1_CSVDescription(ref common.Reference Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1.Icon"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1.Icon"), }, }, }, @@ -797,12 +833,14 @@ func schema_package_server_apis_operators_v1_CSVDescription(ref common.Reference "version": { SchemaProps: spec.SchemaProps{ Description: "Version is the CSV's semantic version", + Default: map[string]interface{}{}, Ref: ref("github.com/operator-framework/api/pkg/lib/version.OperatorVersion"), }, }, "provider": { SchemaProps: spec.SchemaProps{ Description: "Provider is the CSV's provider", + Default: map[string]interface{}{}, Ref: ref("github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1.AppLink"), }, }, @@ -818,8 +856,9 @@ func schema_package_server_apis_operators_v1_CSVDescription(ref common.Reference Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -836,8 +875,9 @@ func schema_package_server_apis_operators_v1_CSVDescription(ref common.Reference Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -854,7 +894,8 @@ func schema_package_server_apis_operators_v1_CSVDescription(ref common.Reference Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1.AppLink"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1.AppLink"), }, }, }, @@ -871,7 +912,8 @@ func schema_package_server_apis_operators_v1_CSVDescription(ref common.Reference Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1.Maintainer"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1.Maintainer"), }, }, }, @@ -902,7 +944,8 @@ func schema_package_server_apis_operators_v1_CSVDescription(ref common.Reference Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.InstallMode"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.InstallMode"), }, }, }, @@ -910,12 +953,14 @@ func schema_package_server_apis_operators_v1_CSVDescription(ref common.Reference }, "customresourcedefinitions": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.CustomResourceDefinitions"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.CustomResourceDefinitions"), }, }, "apiservicedefinitions": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.APIServiceDefinitions"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/api/pkg/operators/v1alpha1.APIServiceDefinitions"), }, }, "nativeApis": { @@ -924,7 +969,8 @@ func schema_package_server_apis_operators_v1_CSVDescription(ref common.Reference Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionKind"), }, }, }, @@ -944,8 +990,9 @@ func schema_package_server_apis_operators_v1_CSVDescription(ref common.Reference Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1019,6 +1066,7 @@ func schema_package_server_apis_operators_v1_PackageChannel(ref common.Reference "name": { SchemaProps: spec.SchemaProps{ Description: "Name is the name of the channel, e.g. `alpha` or `stable`", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1026,6 +1074,7 @@ func schema_package_server_apis_operators_v1_PackageChannel(ref common.Reference "currentCSV": { SchemaProps: spec.SchemaProps{ Description: "CurrentCSV defines a reference to the CSV holding the version of this package currently for the channel.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1033,6 +1082,7 @@ func schema_package_server_apis_operators_v1_PackageChannel(ref common.Reference "currentCSVDesc": { SchemaProps: spec.SchemaProps{ Description: "CurrentCSVSpec holds the spec of the current CSV", + Default: map[string]interface{}{}, Ref: ref("github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1.CSVDescription"), }, }, @@ -1068,17 +1118,20 @@ func schema_package_server_apis_operators_v1_PackageManifest(ref common.Referenc }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, "spec": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1.PackageManifestSpec"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1.PackageManifestSpec"), }, }, "status": { SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1.PackageManifestStatus"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1.PackageManifestStatus"), }, }, }, @@ -1112,7 +1165,8 @@ func schema_package_server_apis_operators_v1_PackageManifestList(ref common.Refe }, "metadata": { SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, "items": { @@ -1126,7 +1180,8 @@ func schema_package_server_apis_operators_v1_PackageManifestList(ref common.Refe Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1.PackageManifest"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1.PackageManifest"), }, }, }, @@ -1162,25 +1217,29 @@ func schema_package_server_apis_operators_v1_PackageManifestStatus(ref common.Re "catalogSource": { SchemaProps: spec.SchemaProps{ Description: "CatalogSource is the name of the CatalogSource this package belongs to", + Default: "", Type: []string{"string"}, Format: "", }, }, "catalogSourceDisplayName": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "catalogSourcePublisher": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "catalogSourceNamespace": { SchemaProps: spec.SchemaProps{ Description: "\n CatalogSourceNamespace is the namespace of the owning CatalogSource", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1188,12 +1247,14 @@ func schema_package_server_apis_operators_v1_PackageManifestStatus(ref common.Re "provider": { SchemaProps: spec.SchemaProps{ Description: "Provider is the provider of the PackageManifest's default CSV", + Default: map[string]interface{}{}, Ref: ref("github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1.AppLink"), }, }, "packageName": { SchemaProps: spec.SchemaProps{ Description: "PackageName is the name of the overall package, ala `etcd`.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1210,7 +1271,8 @@ func schema_package_server_apis_operators_v1_PackageManifestStatus(ref common.Re Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1.PackageChannel"), + Default: map[string]interface{}{}, + Ref: ref("github.com/operator-framework/operator-lifecycle-manager/pkg/package-server/apis/operators/v1.PackageChannel"), }, }, }, @@ -1219,6 +1281,7 @@ func schema_package_server_apis_operators_v1_PackageManifestStatus(ref common.Re "defaultChannel": { SchemaProps: spec.SchemaProps{ Description: "DefaultChannel is, if specified, the name of the default channel for the package. The default channel will be installed if no other channel is explicitly given. If the package has a single channel, then that channel is implicitly the default.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1256,6 +1319,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA "name": { SchemaProps: spec.SchemaProps{ Description: "name is the name of the group.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1267,7 +1331,8 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), }, }, }, @@ -1276,6 +1341,7 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA "preferredVersion": { SchemaProps: spec.SchemaProps{ Description: "preferredVersion is the version preferred by the API server, which probably is the storage version.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.GroupVersionForDiscovery"), }, }, @@ -1286,7 +1352,8 @@ func schema_pkg_apis_meta_v1_APIGroup(ref common.ReferenceCallback) common.OpenA Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), }, }, }, @@ -1329,7 +1396,8 @@ func schema_pkg_apis_meta_v1_APIGroupList(ref common.ReferenceCallback) common.O Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIGroup"), }, }, }, @@ -1354,6 +1422,7 @@ func schema_pkg_apis_meta_v1_APIResource(ref common.ReferenceCallback) common.Op "name": { SchemaProps: spec.SchemaProps{ Description: "name is the plural name of the resource.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1361,6 +1430,7 @@ func schema_pkg_apis_meta_v1_APIResource(ref common.ReferenceCallback) common.Op "singularName": { SchemaProps: spec.SchemaProps{ Description: "singularName is the singular name of the resource. This allows clients to handle plural and singular opaquely. The singularName is more correct for reporting status on a single item and both singular and plural are allowed from the kubectl CLI interface.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1368,6 +1438,7 @@ func schema_pkg_apis_meta_v1_APIResource(ref common.ReferenceCallback) common.Op "namespaced": { SchemaProps: spec.SchemaProps{ Description: "namespaced indicates if a resource is namespaced or not.", + Default: false, Type: []string{"boolean"}, Format: "", }, @@ -1389,6 +1460,7 @@ func schema_pkg_apis_meta_v1_APIResource(ref common.ReferenceCallback) common.Op "kind": { SchemaProps: spec.SchemaProps{ Description: "kind is the kind for the resource (e.g. 'Foo' is the kind for a resource 'foo')", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1400,8 +1472,9 @@ func schema_pkg_apis_meta_v1_APIResource(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1414,8 +1487,9 @@ func schema_pkg_apis_meta_v1_APIResource(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1428,8 +1502,9 @@ func schema_pkg_apis_meta_v1_APIResource(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1473,6 +1548,7 @@ func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) commo "groupVersion": { SchemaProps: spec.SchemaProps{ Description: "groupVersion is the group and version this APIResourceList is for.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1484,7 +1560,8 @@ func schema_pkg_apis_meta_v1_APIResourceList(ref common.ReferenceCallback) commo Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.APIResource"), }, }, }, @@ -1527,8 +1604,9 @@ func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1541,7 +1619,8 @@ func schema_pkg_apis_meta_v1_APIVersions(ref common.ReferenceCallback) common.Op Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ServerAddressByClientCIDR"), }, }, }, @@ -1566,6 +1645,7 @@ func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.Open "type": { SchemaProps: spec.SchemaProps{ Description: "type of condition in CamelCase or in foo.example.com/CamelCase.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1573,6 +1653,7 @@ func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.Open "status": { SchemaProps: spec.SchemaProps{ Description: "status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1587,12 +1668,14 @@ func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.Open "lastTransitionTime": { SchemaProps: spec.SchemaProps{ Description: "lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, "reason": { SchemaProps: spec.SchemaProps{ Description: "reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1600,6 +1683,7 @@ func schema_pkg_apis_meta_v1_Condition(ref common.ReferenceCallback) common.Open "message": { SchemaProps: spec.SchemaProps{ Description: "message is a human readable message indicating details about the transition. This may be an empty string.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1641,8 +1725,9 @@ func schema_pkg_apis_meta_v1_CreateOptions(ref common.ReferenceCallback) common. Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1716,8 +1801,9 @@ func schema_pkg_apis_meta_v1_DeleteOptions(ref common.ReferenceCallback) common. Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1767,6 +1853,7 @@ func schema_pkg_apis_meta_v1_ExportOptions(ref common.ReferenceCallback) common. "export": { SchemaProps: spec.SchemaProps{ Description: "Should this value be exported. Export strips fields that a user can not specify. Deprecated. Planned for removal in 1.18.", + Default: false, Type: []string{"boolean"}, Format: "", }, @@ -1774,6 +1861,7 @@ func schema_pkg_apis_meta_v1_ExportOptions(ref common.ReferenceCallback) common. "exact": { SchemaProps: spec.SchemaProps{ Description: "Should the export be exact. Exact export maintains cluster-specific fields like 'Namespace'. Deprecated. Planned for removal in 1.18.", + Default: false, Type: []string{"boolean"}, Format: "", }, @@ -1839,14 +1927,16 @@ func schema_pkg_apis_meta_v1_GroupKind(ref common.ReferenceCallback) common.Open Properties: map[string]spec.Schema{ "group": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1865,14 +1955,16 @@ func schema_pkg_apis_meta_v1_GroupResource(ref common.ReferenceCallback) common. Properties: map[string]spec.Schema{ "group": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "resource": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1891,14 +1983,16 @@ func schema_pkg_apis_meta_v1_GroupVersion(ref common.ReferenceCallback) common.O Properties: map[string]spec.Schema{ "group": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "version": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1918,6 +2012,7 @@ func schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref common.ReferenceCallba "groupVersion": { SchemaProps: spec.SchemaProps{ Description: "groupVersion specifies the API group and version in the form \"group/version\"", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1925,6 +2020,7 @@ func schema_pkg_apis_meta_v1_GroupVersionForDiscovery(ref common.ReferenceCallba "version": { SchemaProps: spec.SchemaProps{ Description: "version specifies the version in the form of \"version\". This is to save the clients the trouble of splitting the GroupVersion.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -1945,20 +2041,23 @@ func schema_pkg_apis_meta_v1_GroupVersionKind(ref common.ReferenceCallback) comm Properties: map[string]spec.Schema{ "group": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "version": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "kind": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -1977,20 +2076,23 @@ func schema_pkg_apis_meta_v1_GroupVersionResource(ref common.ReferenceCallback) Properties: map[string]spec.Schema{ "group": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "version": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "resource": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -2009,8 +2111,9 @@ func schema_pkg_apis_meta_v1_InternalEvent(ref common.ReferenceCallback) common. Properties: map[string]spec.Schema{ "Type": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "Object": { @@ -2043,8 +2146,9 @@ func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common. Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -2057,7 +2161,8 @@ func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common. Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"), }, }, }, @@ -2065,6 +2170,11 @@ func schema_pkg_apis_meta_v1_LabelSelector(ref common.ReferenceCallback) common. }, }, }, + VendorExtensible: spec.VendorExtensible{ + Extensions: spec.Extensions{ + "x-kubernetes-map-type": "atomic", + }, + }, }, Dependencies: []string{ "k8s.io/apimachinery/pkg/apis/meta/v1.LabelSelectorRequirement"}, @@ -2087,6 +2197,7 @@ func schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref common.ReferenceCallba }, SchemaProps: spec.SchemaProps{ Description: "key is the label key that the selector applies to.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -2094,6 +2205,7 @@ func schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref common.ReferenceCallba "operator": { SchemaProps: spec.SchemaProps{ Description: "operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -2105,8 +2217,9 @@ func schema_pkg_apis_meta_v1_LabelSelectorRequirement(ref common.ReferenceCallba Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -2143,6 +2256,7 @@ func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDe "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -2153,7 +2267,8 @@ func schema_pkg_apis_meta_v1_List(ref common.ReferenceCallback) common.OpenAPIDe Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, }, @@ -2425,6 +2540,7 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope "creationTimestamp": { SchemaProps: spec.SchemaProps{ Description: "CreationTimestamp is a timestamp representing the server time when this object was created. It is not guaranteed to be set in happens-before order across separate operations. Clients may not set this value. It is represented in RFC3339 form and is in UTC.\n\nPopulated by the system. Read-only. Null for lists. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.Time"), }, }, @@ -2449,8 +2565,9 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -2464,8 +2581,9 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope Allows: true, Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -2484,7 +2602,8 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.OwnerReference"), }, }, }, @@ -2502,8 +2621,9 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -2523,7 +2643,8 @@ func schema_pkg_apis_meta_v1_ObjectMeta(ref common.ReferenceCallback) common.Ope Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ManagedFieldsEntry"), }, }, }, @@ -2547,6 +2668,7 @@ func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common "apiVersion": { SchemaProps: spec.SchemaProps{ Description: "API version of the referent.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -2554,6 +2676,7 @@ func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common "kind": { SchemaProps: spec.SchemaProps{ Description: "Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: "", Type: []string{"string"}, Format: "", }, @@ -2561,6 +2684,7 @@ func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common "name": { SchemaProps: spec.SchemaProps{ Description: "Name of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#names", + Default: "", Type: []string{"string"}, Format: "", }, @@ -2568,6 +2692,7 @@ func schema_pkg_apis_meta_v1_OwnerReference(ref common.ReferenceCallback) common "uid": { SchemaProps: spec.SchemaProps{ Description: "UID of the referent. More info: http://kubernetes.io/docs/user-guide/identifiers#uids", + Default: "", Type: []string{"string"}, Format: "", }, @@ -2617,6 +2742,7 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadata(ref common.ReferenceCallback) "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"), }, }, @@ -2652,6 +2778,7 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -2662,7 +2789,8 @@ func schema_pkg_apis_meta_v1_PartialObjectMetadataList(ref common.ReferenceCallb Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.PartialObjectMetadata"), }, }, }, @@ -2716,8 +2844,9 @@ func schema_pkg_apis_meta_v1_PatchOptions(ref common.ReferenceCallback) common.O Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -2784,8 +2913,9 @@ func schema_pkg_apis_meta_v1_RootPaths(ref common.ReferenceCallback) common.Open Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -2808,6 +2938,7 @@ func schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref common.ReferenceCallb "clientCIDR": { SchemaProps: spec.SchemaProps{ Description: "The CIDR with which clients can match their IP to figure out the server address that they should use.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -2815,6 +2946,7 @@ func schema_pkg_apis_meta_v1_ServerAddressByClientCIDR(ref common.ReferenceCallb "serverAddress": { SchemaProps: spec.SchemaProps{ Description: "Address of this server, suitable for a client that matches the above CIDR. This can be a hostname, hostname:port, IP or IP:port.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -2850,6 +2982,7 @@ func schema_pkg_apis_meta_v1_Status(ref common.ReferenceCallback) common.OpenAPI "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -2971,7 +3104,8 @@ func schema_pkg_apis_meta_v1_StatusDetails(ref common.ReferenceCallback) common. Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.StatusCause"), }, }, }, @@ -3016,6 +3150,7 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID "metadata": { SchemaProps: spec.SchemaProps{ Description: "Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"), }, }, @@ -3026,7 +3161,8 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableColumnDefinition"), }, }, }, @@ -3039,7 +3175,8 @@ func schema_pkg_apis_meta_v1_Table(ref common.ReferenceCallback) common.OpenAPID Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRow"), }, }, }, @@ -3064,6 +3201,7 @@ func schema_pkg_apis_meta_v1_TableColumnDefinition(ref common.ReferenceCallback) "name": { SchemaProps: spec.SchemaProps{ Description: "name is a human readable name for the column.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -3071,6 +3209,7 @@ func schema_pkg_apis_meta_v1_TableColumnDefinition(ref common.ReferenceCallback) "type": { SchemaProps: spec.SchemaProps{ Description: "type is an OpenAPI type definition for this column, such as number, integer, string, or array. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -3078,6 +3217,7 @@ func schema_pkg_apis_meta_v1_TableColumnDefinition(ref common.ReferenceCallback) "format": { SchemaProps: spec.SchemaProps{ Description: "format is an optional OpenAPI type modifier for this column. A format modifies the type and imposes additional rules, like date or time formatting for a string. The 'name' format is applied to the primary identifier column which has type 'string' to assist in clients identifying column is the resource name. See https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#data-types for more.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -3085,6 +3225,7 @@ func schema_pkg_apis_meta_v1_TableColumnDefinition(ref common.ReferenceCallback) "description": { SchemaProps: spec.SchemaProps{ Description: "description is a human readable description of this column.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -3092,6 +3233,7 @@ func schema_pkg_apis_meta_v1_TableColumnDefinition(ref common.ReferenceCallback) "priority": { SchemaProps: spec.SchemaProps{ Description: "priority is an integer defining the relative importance of this column compared to others. Lower numbers are considered higher priority. Columns that may be omitted in limited space scenarios should be given a higher priority.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -3165,7 +3307,8 @@ func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenA Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition"), + Default: map[string]interface{}{}, + Ref: ref("k8s.io/apimachinery/pkg/apis/meta/v1.TableRowCondition"), }, }, }, @@ -3174,6 +3317,7 @@ func schema_pkg_apis_meta_v1_TableRow(ref common.ReferenceCallback) common.OpenA "object": { SchemaProps: spec.SchemaProps{ Description: "This field contains the requested additional information about each object based on the includeObject policy when requesting the Table. If \"None\", this field is empty, if \"Object\" this will be the default serialization of the object for the current API version, and if \"Metadata\" (the default) will contain the object metadata. Check the returned kind and apiVersion of the object before parsing. The media type of the object will always match the enclosing list - if this as a JSON table, these will be JSON encoded objects.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, @@ -3196,6 +3340,7 @@ func schema_pkg_apis_meta_v1_TableRowCondition(ref common.ReferenceCallback) com "type": { SchemaProps: spec.SchemaProps{ Description: "Type of row condition. The only defined value is 'Completed' indicating that the object this row represents has reached a completed state and may be given less visual priority than other rows. Clients are not required to honor any conditions but should be consistent where possible about handling the conditions.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -3203,6 +3348,7 @@ func schema_pkg_apis_meta_v1_TableRowCondition(ref common.ReferenceCallback) com "status": { SchemaProps: spec.SchemaProps{ Description: "Status of the condition, one of True, False, Unknown.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -3250,6 +3396,7 @@ func schema_pkg_apis_meta_v1_Timestamp(ref common.ReferenceCallback) common.Open "seconds": { SchemaProps: spec.SchemaProps{ Description: "Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.", + Default: 0, Type: []string{"integer"}, Format: "int64", }, @@ -3257,6 +3404,7 @@ func schema_pkg_apis_meta_v1_Timestamp(ref common.ReferenceCallback) common.Open "nanos": { SchemaProps: spec.SchemaProps{ Description: "Non-negative fractions of a second at nanosecond resolution. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be from 0 to 999,999,999 inclusive. This field may be limited in precision depending on context.", + Default: 0, Type: []string{"integer"}, Format: "int32", }, @@ -3323,8 +3471,9 @@ func schema_pkg_apis_meta_v1_UpdateOptions(ref common.ReferenceCallback) common. Items: &spec.SchemaOrArray{ Schema: &spec.Schema{ SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, @@ -3352,13 +3501,15 @@ func schema_pkg_apis_meta_v1_WatchEvent(ref common.ReferenceCallback) common.Ope Properties: map[string]spec.Schema{ "type": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "object": { SchemaProps: spec.SchemaProps{ Description: "Object is:\n * If Type is Added or Modified: the new state of the object.\n * If Type is Deleted: the state of the object immediately before deletion.\n * If Type is Error: *Status is recommended; other types may make sense\n depending on context.", + Default: map[string]interface{}{}, Ref: ref("k8s.io/apimachinery/pkg/runtime.RawExtension"), }, }, @@ -3436,6 +3587,7 @@ func schema_k8sio_apimachinery_pkg_runtime_Unknown(ref common.ReferenceCallback) "ContentEncoding": { SchemaProps: spec.SchemaProps{ Description: "ContentEncoding is encoding used to encode 'Raw' data. Unspecified means no encoding.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -3443,6 +3595,7 @@ func schema_k8sio_apimachinery_pkg_runtime_Unknown(ref common.ReferenceCallback) "ContentType": { SchemaProps: spec.SchemaProps{ Description: "ContentType is serialization method used to serialize 'Raw'. Unspecified means ContentTypeJSON.", + Default: "", Type: []string{"string"}, Format: "", }, @@ -3463,56 +3616,65 @@ func schema_k8sio_apimachinery_pkg_version_Info(ref common.ReferenceCallback) co Properties: map[string]spec.Schema{ "major": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "minor": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "gitVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "gitCommit": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "gitTreeState": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "buildDate": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "goVersion": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "compiler": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "platform": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, },