diff --git a/README.md b/README.md index 2540eba6ff..8ca7009bd3 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ helm install kube-ui-server appscode/kube-ui-server ## Usage ```console -$ kubectl create -f artifacts/whoami.yaml -o yaml +$ kubectl create -f artifacts/whoami.yaml -o yaml --validate=false apiVersion: authentication.k8s.io/v1 kind: SelfSubjectReview diff --git a/go.mod b/go.mod index 5a8b0613a2..b1b8335a36 100644 --- a/go.mod +++ b/go.mod @@ -47,12 +47,12 @@ require ( k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 kmodules.xyz/apiversion v0.2.0 kmodules.xyz/authorizer v0.29.1 - kmodules.xyz/client-go v0.30.37 + kmodules.xyz/client-go v0.30.38 kmodules.xyz/custom-resources v0.30.0 kmodules.xyz/go-containerregistry v0.0.12 - kmodules.xyz/monitoring-agent-api v0.30.2 + kmodules.xyz/monitoring-agent-api v0.30.4 kmodules.xyz/offshoot-api v0.30.1 - kmodules.xyz/resource-metadata v0.22.3-0.20241114091625-6c277c3fe863 + kmodules.xyz/resource-metadata v0.22.3 kmodules.xyz/resource-metrics v0.30.5 kmodules.xyz/resource-metrics/utils v0.30.4 kmodules.xyz/sets v0.29.0 diff --git a/go.sum b/go.sum index 14c9504e4a..35ddcaa915 100644 --- a/go.sum +++ b/go.sum @@ -927,20 +927,20 @@ kmodules.xyz/apiversion v0.2.0 h1:vAQYqZFm4xu4pbB1cAdHbFEPES6EQkcR4wc06xdTOWk= kmodules.xyz/apiversion v0.2.0/go.mod h1:oPX8g8LvlPdPX3Yc5YvCzJHQnw3YF/X4/jdW0b1am80= kmodules.xyz/authorizer v0.29.1 h1:uByGGoryKbZcfiEAhjcK/Y345I9mygNQP7DVpkMbNQQ= kmodules.xyz/authorizer v0.29.1/go.mod h1:kZRhclL8twzyt2bQuJQJbpYww2sc+qFr8I5PPoq/sWY= -kmodules.xyz/client-go v0.30.37 h1:hj4BMsNDgRVc2aDPB6Y3x5iCylXTZDZeQPJp/oA6lxs= -kmodules.xyz/client-go v0.30.37/go.mod h1:CAu+JlA8RVGtj6LQHu0Q1w2mnFUajuti49c7T1AvGdM= +kmodules.xyz/client-go v0.30.38 h1:kAQ3FdgX2HbkmfFGEoeKz7fmJYWo1Ndgdum50aaHyI0= +kmodules.xyz/client-go v0.30.38/go.mod h1:CAu+JlA8RVGtj6LQHu0Q1w2mnFUajuti49c7T1AvGdM= kmodules.xyz/crd-schema-fuzz v0.29.1 h1:zJTlWYOrT5dsVVHW8HGcnR/vaWfxQfNh11QwTtkYpcs= kmodules.xyz/crd-schema-fuzz v0.29.1/go.mod h1:n708z9YQqLMP2KNLQVgBcRJw1QpSWLvpNCEi+KJDOYE= kmodules.xyz/custom-resources v0.30.0 h1:vR3CbseHMLwR4GvtcJJuRuwIV8voKqFqNii27rMcm1o= kmodules.xyz/custom-resources v0.30.0/go.mod h1:ZsTuI2mLG2s3byre7bHmpxJ9w0HDqAkRTL1+izGFI24= kmodules.xyz/go-containerregistry v0.0.12 h1:Tl32QGmSqRVm9PUEb/f3dgDeu9zW5fVzt3qmAFIE37I= kmodules.xyz/go-containerregistry v0.0.12/go.mod h1:KgeNg0hDsgeda+qc0NzWk0iVRdF0+ZIg/oRzGoYh78I= -kmodules.xyz/monitoring-agent-api v0.30.2 h1:sAgz5P5EXZqhlj1NzJ+QltAgeIx5bGSMj+aYy2EiKaw= -kmodules.xyz/monitoring-agent-api v0.30.2/go.mod h1:BoZFPDDRB7J39CcUsSDlzgW8PQCwik4ILPleyUob+Mg= +kmodules.xyz/monitoring-agent-api v0.30.4 h1:6CTKxYJKpWDsDYb0WRBHGFoW3xQof05d+W8CC34BZMc= +kmodules.xyz/monitoring-agent-api v0.30.4/go.mod h1:ZuTQ5uGi6H80QLsOTuuC7m58dfXDGUv0YB+s059gnr4= kmodules.xyz/offshoot-api v0.30.1 h1:TrulAYO+oBsXe9sZZGTmNWIuI8qD2izMpgcTSPvgAmI= kmodules.xyz/offshoot-api v0.30.1/go.mod h1:T3mpjR6fui0QzOcmQvIuANytW48fe9ytmy/1cgx6D4g= -kmodules.xyz/resource-metadata v0.22.3-0.20241114091625-6c277c3fe863 h1:dfsQYd8Uk8iQ/kcwddhL8GNXTN/i8e6UB3C4t0ArwyM= -kmodules.xyz/resource-metadata v0.22.3-0.20241114091625-6c277c3fe863/go.mod h1:G57v46vQOq5P1HIs9Rl7lJ5Y4dBcjJG5OyxApTdSyNs= +kmodules.xyz/resource-metadata v0.22.3 h1:cDxIvOYcWPnv372puDmhB0klHXaaQrV98JloeTkC4wU= +kmodules.xyz/resource-metadata v0.22.3/go.mod h1:zq0gtycDR21iPzhhqrbOGF4lwffIgQ9xiS8T34aJqjk= kmodules.xyz/resource-metrics v0.30.5 h1:ZhpGeR9DCz1HTrKUg/mWhr95wlFzCPRdgVAqwaggy1o= kmodules.xyz/resource-metrics v0.30.5/go.mod h1:w9+rz7/s/kGP1GWzYSuRdCn+l7EwpesmESSEHkLBnIQ= kmodules.xyz/resource-metrics/utils v0.30.4 h1:bJS/x0Qr7N1FFdxugFbzZ/Es6HVs4ptsFlhkmgj3jac= diff --git a/pkg/apiserver/apiserver.go b/pkg/apiserver/apiserver.go index 99acffcb0e..287338e318 100644 --- a/pkg/apiserver/apiserver.go +++ b/pkg/apiserver/apiserver.go @@ -77,7 +77,6 @@ import ( "github.com/pkg/errors" monitoringv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" openvizapi "go.openviz.dev/apimachinery/apis/openviz/v1alpha1" - openvizcs "go.openviz.dev/apimachinery/client/clientset/versioned" crdinstall "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/install" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" @@ -242,10 +241,6 @@ func (c completedConfig) New(ctx context.Context) (*UIServer, error) { if err != nil { return nil, fmt.Errorf("unable to create discovery client, reason: %v", err) } - oc, err := openvizcs.NewForConfig(cfg) - if err != nil { - return nil, fmt.Errorf("unable to create openviz client, reason: %v", err) - } cid, err := clustermeta.ClusterUID(mgr.GetAPIReader()) if err != nil { @@ -331,9 +326,9 @@ func (c completedConfig) New(ctx context.Context) (*UIServer, error) { v1alpha1storage := map[string]rest.Storage{} v1alpha1storage[rsapi.ResourceChartPresetQueries] = chartpresetquery.NewStorage(ctrlClient) v1alpha1storage[rsapi.ResourceClusterStatuses] = clusterstatusstorage.NewStorage(ctrlClient, kc) - v1alpha1storage[rsapi.ResourceRenderDashboards] = renderdashboard.NewStorage(ctrlClient, oc) + v1alpha1storage[rsapi.ResourceRenderDashboards] = renderdashboard.NewStorage(ctrlClient) v1alpha1storage[rsapi.ResourceRenderRawGraphs] = renderrawgraph.NewStorage(ctrlClient) - v1alpha1storage[rsapi.ResourceRenders] = render.NewStorage(ctrlClient, oc, rbacAuthorizer) + v1alpha1storage[rsapi.ResourceRenders] = render.NewStorage(ctrlClient, rbacAuthorizer) v1alpha1storage[rsapi.ResourceResourceBlockDefinitions] = resourceblockdefinition.NewStorage() v1alpha1storage[rsapi.ResourceResourceCalculators] = resourcecalculatorstorage.NewStorage(ctrlClient, cid, rbacAuthorizer) v1alpha1storage[rsapi.ResourceResourceDescriptors] = resourcedescriptor.NewStorage() diff --git a/pkg/graph/dashboard.go b/pkg/graph/dashboard.go index 796ee01b45..e79d58c163 100644 --- a/pkg/graph/dashboard.go +++ b/pkg/graph/dashboard.go @@ -26,9 +26,8 @@ import ( "github.com/pkg/errors" openvizauipi "go.openviz.dev/apimachinery/apis/ui/v1alpha1" - openvizcs "go.openviz.dev/apimachinery/client/clientset/versioned" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" + "k8s.io/apimachinery/pkg/runtime" kmapi "kmodules.xyz/client-go/api/v1" sharedapi "kmodules.xyz/resource-metadata/apis/shared" uiapi "kmodules.xyz/resource-metadata/apis/ui/v1alpha1" @@ -37,7 +36,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" ) -func renderDashboard(kc client.Client, oc openvizcs.Interface, srcObj *unstructured.Unstructured) tableconvertor.DashboardRendererFunc { +func renderDashboard(ctx context.Context, kc client.Client, srcObj *unstructured.Unstructured) tableconvertor.DashboardRendererFunc { return func(name string) (*uiapi.ResourceDashboard, string, error) { rd, err := resourcedashboards.LoadByName(kc, name) if err != nil { @@ -52,7 +51,7 @@ func renderDashboard(kc client.Client, oc openvizcs.Interface, srcObj *unstructu if len(rd.Spec.Dashboards) > 1 { return nil, "", fmt.Errorf("multiple dashboards configured for %s", name) } - dg, err := RenderDashboard(kc, oc, rd, srcObj, false) + dg, err := RenderDashboard(ctx, kc, rd, srcObj, false) if err != nil { return nil, "", err } @@ -60,7 +59,7 @@ func renderDashboard(kc client.Client, oc openvizcs.Interface, srcObj *unstructu } } -func RenderDashboard(kc client.Client, oc openvizcs.Interface, rd *uiapi.ResourceDashboard, src *unstructured.Unstructured, embeddedLink bool) (*openvizauipi.DashboardGroup, error) { +func RenderDashboard(ctx context.Context, kc client.Client, rd *uiapi.ResourceDashboard, src *unstructured.Unstructured, embeddedLink bool) (*openvizauipi.DashboardGroup, error) { if rd.Spec.Provider != uiapi.DashboardProviderGrafana { return nil, fmt.Errorf("dashboard %s uses unsupported provider %q", rd.Name, rd.Spec.Provider) } @@ -85,7 +84,7 @@ func RenderDashboard(kc client.Client, oc openvizcs.Interface, rd *uiapi.Resourc result = strings.TrimSpace(result) cond = strings.EqualFold(result, "true") } else if d.If.Connected != nil { - _, targets, err := ExecRawQuery(kc, kmapi.NewObjectID(src).OID(), *d.If.Connected) + _, targets, err := ExecRawQuery(ctx, kc, kmapi.NewObjectID(src).OID(), *d.If.Connected) if err != nil { return nil, errors.Wrapf(err, "failed to check connection for dashboard with title %s", d.Title) } @@ -124,5 +123,20 @@ func RenderDashboard(kc client.Client, oc openvizcs.Interface, rd *uiapi.Resourc } dg.Request.Dashboards = append(dg.Request.Dashboards, out) } - return oc.UiV1alpha1().DashboardGroups().Create(context.TODO(), dg, metav1.CreateOptions{}) + + content, err := runtime.DefaultUnstructuredConverter.ToUnstructured(dg) + if err != nil { + return nil, err + } + req := unstructured.Unstructured{Object: content} + req.SetGroupVersionKind(openvizauipi.SchemeGroupVersion.WithKind(openvizauipi.ResourceKindDashboardGroup)) + err = kc.Create(ctx, &req) + if err != nil { + return nil, err + } + err = runtime.DefaultUnstructuredConverter.FromUnstructured(req.UnstructuredContent(), dg) + if err != nil { + return nil, err + } + return dg, err } diff --git a/pkg/graph/pods.go b/pkg/graph/pods.go index b7c3dc82f0..fa3ccc088b 100755 --- a/pkg/graph/pods.go +++ b/pkg/graph/pods.go @@ -94,7 +94,7 @@ func LocatePods(ctx context.Context, kc client.Client, req *kmapi.ObjectInfo) ([ }, } - _, refs, err := ExecRawQuery(kc, src.OID(), target) + _, refs, err := ExecRawQuery(ctx, kc, src.OID(), target) if err != nil { return nil, err } diff --git a/pkg/graph/renderer.go b/pkg/graph/renderer.go index 3831f0c229..5caad4f864 100644 --- a/pkg/graph/renderer.go +++ b/pkg/graph/renderer.go @@ -27,7 +27,6 @@ import ( "kubeops.dev/ui-server/pkg/shared" "github.com/pkg/errors" - openvizcs "go.openviz.dev/apimachinery/client/clientset/versioned" "k8s.io/apimachinery/pkg/api/meta" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/labels" @@ -43,8 +42,8 @@ import ( ) func RenderLayout( + ctx context.Context, kc client.Client, - oc openvizcs.Interface, src kmapi.ObjectInfo, layoutName string, // optional pageName string, // optional @@ -57,7 +56,7 @@ func RenderLayout( } var srcObj unstructured.Unstructured srcObj.SetGroupVersionKind(srcRID.GroupVersionKind()) - err = kc.Get(context.TODO(), src.Ref.ObjectKey(), &srcObj) + err = kc.Get(ctx, src.Ref.ObjectKey(), &srcObj) if err != nil { return nil, err } @@ -118,14 +117,14 @@ func RenderLayout( } if layout.Spec.Header != nil && okToRender(layout.Spec.Header.Kind, renderBlocks) { - if bv, err := renderPageBlock(kc, oc, srcRID, &srcObj, layout.Spec.Header, convertToTable); err != nil { + if bv, err := renderPageBlock(ctx, kc, srcRID, &srcObj, layout.Spec.Header, convertToTable); err != nil { return nil, err } else { out.Header = bv } } if layout.Spec.TabBar != nil && okToRender(layout.Spec.TabBar.Kind, renderBlocks) { - if bv, err := renderPageBlock(kc, oc, srcRID, &srcObj, layout.Spec.TabBar, convertToTable); err != nil { + if bv, err := renderPageBlock(ctx, kc, srcRID, &srcObj, layout.Spec.TabBar, convertToTable); err != nil { return nil, err } else { out.TabBar = bv @@ -151,14 +150,14 @@ func RenderLayout( Blocks: nil, } if sectionLayout.Info != nil && okToRender(sectionLayout.Info.Kind, renderBlocks) { - if bv, err := renderPageBlock(kc, oc, srcRID, &srcObj, sectionLayout.Info, convertToTable); err != nil { + if bv, err := renderPageBlock(ctx, kc, srcRID, &srcObj, sectionLayout.Info, convertToTable); err != nil { return nil, err } else { section.Info = bv } } if sectionLayout.Insight != nil && okToRender(sectionLayout.Insight.Kind, renderBlocks) { - if bv, err := renderPageBlock(kc, oc, srcRID, &srcObj, sectionLayout.Insight, convertToTable); err != nil { + if bv, err := renderPageBlock(ctx, kc, srcRID, &srcObj, sectionLayout.Insight, convertToTable); err != nil { return nil, err } else { section.Insight = bv @@ -168,7 +167,7 @@ func RenderLayout( blocks := make([]rsapi.PageBlockView, 0, len(sectionLayout.Blocks)) for _, block := range sectionLayout.Blocks { if okToRender(block.Kind, renderBlocks) { - if bv, err := renderPageBlock(kc, oc, srcRID, &srcObj, &block, convertToTable); err != nil { + if bv, err := renderPageBlock(ctx, kc, srcRID, &srcObj, &block, convertToTable); err != nil { return nil, err } else { blocks = append(blocks, *bv) @@ -190,23 +189,23 @@ func okToRender(kind rsapi.TableKind, renderBlocks sets.Set[string]) bool { return renderBlocks.Len() == 0 || renderBlocks.Has(string(kind)) } -func RenderPageBlock(kc client.Client, oc openvizcs.Interface, src kmapi.ObjectInfo, block *rsapi.PageBlockLayout, convertToTable bool) (*rsapi.PageBlockView, error) { +func RenderPageBlock(ctx context.Context, kc client.Client, src kmapi.ObjectInfo, block *rsapi.PageBlockLayout, convertToTable bool) (*rsapi.PageBlockView, error) { srcRID, err := kmapi.ExtractResourceID(kc.RESTMapper(), src.Resource) if err != nil { return nil, errors.Wrap(err, "failed to detect src resource id") } var srcObj unstructured.Unstructured srcObj.SetGroupVersionKind(srcRID.GroupVersionKind()) - err = kc.Get(context.TODO(), src.Ref.ObjectKey(), &srcObj) + err = kc.Get(ctx, src.Ref.ObjectKey(), &srcObj) if err != nil { return nil, err } - return renderPageBlock(kc, oc, srcRID, &srcObj, block, convertToTable) + return renderPageBlock(ctx, kc, srcRID, &srcObj, block, convertToTable) } -func renderPageBlock(kc client.Client, oc openvizcs.Interface, srcRID *kmapi.ResourceID, srcObj *unstructured.Unstructured, block *rsapi.PageBlockLayout, convertToTable bool) (*rsapi.PageBlockView, error) { - bv, err := _renderPageBlock(kc, oc, srcRID, srcObj, block, convertToTable) +func renderPageBlock(ctx context.Context, kc client.Client, srcRID *kmapi.ResourceID, srcObj *unstructured.Unstructured, block *rsapi.PageBlockLayout, convertToTable bool) (*rsapi.PageBlockView, error) { + bv, err := _renderPageBlock(ctx, kc, srcRID, srcObj, block, convertToTable) if err != nil { bv.Result = rsapi.RenderResult{ Status: rsapi.RenderError, @@ -220,7 +219,16 @@ func renderPageBlock(kc client.Client, oc openvizcs.Interface, srcRID *kmapi.Res return bv, nil } -func _renderPageBlock(kc client.Client, oc openvizcs.Interface, srcRID *kmapi.ResourceID, srcObj *unstructured.Unstructured, block *rsapi.PageBlockLayout, convertToTable bool) (*rsapi.PageBlockView, error) { +func _renderPageBlock(ctx context.Context, kc client.Client, srcRID *kmapi.ResourceID, srcObj *unstructured.Unstructured, block *rsapi.PageBlockLayout, convertToTable bool) (*rsapi.PageBlockView, error) { + var impersonate bool + if block != nil && block.ResourceLocator != nil && block.Impersonate { + impersonate = true + } + cc, err := NewClient(ctx, kc, impersonate) + if err != nil { + return nil, err + } + out := rsapi.PageBlockView{ Kind: block.Kind, Name: block.Name, @@ -231,11 +239,11 @@ func _renderPageBlock(kc client.Client, oc openvizcs.Interface, srcRID *kmapi.Re if block.Kind == rsapi.TableKindSelf || block.Kind == rsapi.TableKindSubTable { out.Resource = srcRID if convertToTable { - converter, err := tableconvertor.New(block.FieldPath, block.View.Columns, renderDashboard(kc, oc, srcObj), RenderExec(nil, &srcGVR)) + converter, err := tableconvertor.New(block.FieldPath, block.View.Columns, renderDashboard(ctx, cc, srcObj), RenderExec(nil, &srcGVR)) if err != nil { return &out, err } - table, err := converter.ConvertToTable(context.TODO(), srcObj) + table, err := converter.ConvertToTable(ctx, srcObj) if err != nil { return &out, err } @@ -248,7 +256,7 @@ func _renderPageBlock(kc client.Client, oc openvizcs.Interface, srcRID *kmapi.Re return &out, fmt.Errorf("unsupported table kind found in block %+v", block) } - mapping, err := kc.RESTMapper().RESTMapping(schema.GroupKind{ + mapping, err := cc.RESTMapper().RESTMapping(schema.GroupKind{ Group: block.Ref.Group, Kind: block.Ref.Kind, }) @@ -292,24 +300,24 @@ func _renderPageBlock(kc client.Client, oc openvizcs.Interface, srcRID *kmapi.Re // handle FalcoEvent list call if vars[sharedapi.GraphQueryVarTargetGroup] == falco.GroupName && vars[sharedapi.GraphQueryVarTargetKind] == falcov1alpha1.ResourceKindFalcoEvent { - objs, err = listFalcoEvents(kc, block, srcID) + objs, err = listFalcoEvents(ctx, cc, block, srcID) if err != nil { return &out, err } } else { - objs, err = ExecGraphQLQuery(kc, q, vars) + objs, err = ExecGraphQLQuery(cc, q, vars) if err != nil { return &out, err } } if convertToTable { - converter, err := tableconvertor.New(block.FieldPath, block.View.Columns, renderDashboard(kc, oc, srcObj), RenderExec(&srcGVR, &mapping.Resource)) + converter, err := tableconvertor.New(block.FieldPath, block.View.Columns, renderDashboard(ctx, cc, srcObj), RenderExec(&srcGVR, &mapping.Resource)) if err != nil { return &out, err } list := &unstructured.UnstructuredList{Items: objs} - table, err := converter.ConvertToTable(context.TODO(), list) + table, err := converter.ConvertToTable(ctx, list) if err != nil { return &out, err } @@ -327,17 +335,17 @@ func _renderPageBlock(kc client.Client, oc openvizcs.Interface, srcRID *kmapi.Re } u := unstructured.Unstructured{Object: obj} u.SetGroupVersionKind(mapping.GroupVersionKind) - err = kc.Create(context.TODO(), &u) + err = cc.Create(ctx, &u) if err != nil { return &out, err } if convertToTable { - converter, err := tableconvertor.New(block.FieldPath, block.View.Columns, renderDashboard(kc, oc, srcObj), RenderExec(&srcGVR, &mapping.Resource)) + converter, err := tableconvertor.New(block.FieldPath, block.View.Columns, renderDashboard(ctx, cc, srcObj), RenderExec(&srcGVR, &mapping.Resource)) if err != nil { return &out, err } - table, err := converter.ConvertToTable(context.TODO(), &u) + table, err := converter.ConvertToTable(ctx, &u) if err != nil { return &out, err } @@ -349,7 +357,7 @@ func _renderPageBlock(kc client.Client, oc openvizcs.Interface, srcRID *kmapi.Re return &out, nil } -func listFalcoEvents(kc client.Client, block *rsapi.PageBlockLayout, srcID *kmapi.ObjectID) ([]unstructured.Unstructured, error) { +func listFalcoEvents(ctx context.Context, kc client.Client, block *rsapi.PageBlockLayout, srcID *kmapi.ObjectID) ([]unstructured.Unstructured, error) { var refs []kmapi.ObjectReference var err error if srcID.Kind == "Pod" { @@ -376,7 +384,7 @@ func listFalcoEvents(kc client.Client, block *rsapi.PageBlockLayout, srcID *kmap var list unstructured.UnstructuredList list.SetGroupVersionKind(falcov1alpha1.SchemeGroupVersion.WithKind(falcov1alpha1.ResourceKindFalcoEvent)) - err = kc.List(context.TODO(), &list, &client.ListOptions{LabelSelector: selector}) + err = kc.List(ctx, &list, &client.ListOptions{LabelSelector: selector}) if meta.IsNoMatchError(err) { return nil, err } else if err == nil { diff --git a/pkg/graph/setup.go b/pkg/graph/setup.go index b0868f23a0..5ce27cafc2 100644 --- a/pkg/graph/setup.go +++ b/pkg/graph/setup.go @@ -34,12 +34,14 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" utilerrors "k8s.io/apimachinery/pkg/util/errors" "k8s.io/apimachinery/pkg/util/wait" + "k8s.io/apiserver/pkg/endpoints/request" "k8s.io/client-go/discovery" "k8s.io/client-go/kubernetes" _ "k8s.io/client-go/plugin/pkg/client/auth" restclient "k8s.io/client-go/rest" "k8s.io/klog/v2" kmapi "kmodules.xyz/client-go/api/v1" + cu "kmodules.xyz/client-go/client" meta_util "kmodules.xyz/client-go/meta" sharedapi "kmodules.xyz/resource-metadata/apis/shared" ksets "kmodules.xyz/sets" @@ -247,8 +249,13 @@ func extractRefs(data map[string]interface{}, result ksets.ObjectReference) erro return nil } -func ExecRawQuery(kc client.Client, src kmapi.OID, target sharedapi.ResourceLocator) (*kmapi.ResourceID, []kmapi.ObjectReference, error) { - mapping, err := kc.RESTMapper().RESTMapping(schema.GroupKind{ +func ExecRawQuery(ctx context.Context, kc client.Client, src kmapi.OID, target sharedapi.ResourceLocator) (*kmapi.ResourceID, []kmapi.ObjectReference, error) { + cc, err := NewClient(ctx, kc, target.Impersonate) + if err != nil { + return nil, nil, err + } + + mapping, err := cc.RESTMapper().RESTMapping(schema.GroupKind{ Group: target.Ref.Group, Kind: target.Ref.Kind, }) @@ -267,7 +274,7 @@ func ExecRawQuery(kc client.Client, src kmapi.OID, target sharedapi.ResourceLoca return rid, result, err } - obj, err := execRestQuery(kc, q, mapping.GroupVersionKind) + obj, err := execRestQuery(ctx, cc, q, mapping.GroupVersionKind) if err != nil { return nil, nil, err } @@ -278,8 +285,13 @@ func ExecRawQuery(kc client.Client, src kmapi.OID, target sharedapi.ResourceLoca return rid, []kmapi.ObjectReference{ref}, nil } -func ExecQuery(kc client.Client, src kmapi.OID, target sharedapi.ResourceLocator) (*kmapi.ResourceID, []unstructured.Unstructured, error) { - mapping, err := kc.RESTMapper().RESTMapping(schema.GroupKind{ +func ExecQuery(ctx context.Context, kc client.Client, src kmapi.OID, target sharedapi.ResourceLocator) (*kmapi.ResourceID, []unstructured.Unstructured, error) { + cc, err := NewClient(ctx, kc, target.Impersonate) + if err != nil { + return nil, nil, err + } + + mapping, err := cc.RESTMapper().RESTMapping(schema.GroupKind{ Group: target.Ref.Group, Kind: target.Ref.Kind, }) @@ -294,18 +306,18 @@ func ExecQuery(kc client.Client, src kmapi.OID, target sharedapi.ResourceLocator } if target.Query.Type == sharedapi.GraphQLQuery { - result, err := ExecGraphQLQuery(kc, q, vars) + result, err := ExecGraphQLQuery(cc, q, vars) return rid, result, err } - obj, err := execRestQuery(kc, q, mapping.GroupVersionKind) + obj, err := execRestQuery(ctx, cc, q, mapping.GroupVersionKind) if err != nil { return rid, nil, err } return rid, []unstructured.Unstructured{*obj}, nil } -func execRestQuery(kc client.Client, q string, gvk schema.GroupVersionKind) (*unstructured.Unstructured, error) { +func execRestQuery(ctx context.Context, kc client.Client, q string, gvk schema.GroupVersionKind) (*unstructured.Unstructured, error) { var out unstructured.Unstructured err := yaml.Unmarshal([]byte(q), &out) if err != nil { @@ -313,9 +325,31 @@ func execRestQuery(kc client.Client, q string, gvk schema.GroupVersionKind) (*un } out.SetGroupVersionKind(gvk) - err = kc.Create(context.TODO(), &out) + err = kc.Create(ctx, &out) if err != nil { return nil, err } return &out, nil } + +func NewClient(ctx context.Context, kc client.Client, impersonate bool) (client.Client, error) { + u, found := request.UserFrom(ctx) + + if !impersonate || !found || len(u.GetExtra()[kmapi.AceOrgIDKey]) != 1 { + return kc, nil + } + + if rw, ok := kc.(*cu.DelegatingClient); ok { + _, cc, err := rw.Impersonate(u) + return cc, err + } + return nil, fmt.Errorf("can't impersonate client") +} + +func NewUserContext(in context.Context) context.Context { + ctx := context.TODO() + if u, ok := request.UserFrom(in); ok { + ctx = request.WithUser(ctx, u) + } + return ctx +} diff --git a/pkg/registry/core/resourceservice/storage.go b/pkg/registry/core/resourceservice/storage.go index 2128e16ed1..7d9feb8be5 100644 --- a/pkg/registry/core/resourceservice/storage.go +++ b/pkg/registry/core/resourceservice/storage.go @@ -159,7 +159,7 @@ func (r *Storage) Get(ctx context.Context, name string, options *metav1.GetOptio return nil, err } - return r.toGenericResourceService(obj, rid, cmeta) + return r.toGenericResourceService(ctx, obj, rid, cmeta) } func (r *Storage) List(ctx context.Context, options *internalversion.ListOptions) (runtime.Object, error) { @@ -236,7 +236,7 @@ func (r *Storage) List(ctx context.Context, options *internalversion.ListOptions continue } - genres, err := r.toGenericResourceService(item, apiType, cmeta) + genres, err := r.toGenericResourceService(ctx, item, apiType, cmeta) if err != nil { return nil, err } @@ -275,7 +275,7 @@ func (r *Storage) ConvertToTable(ctx context.Context, object runtime.Object, tab return r.convertor.ConvertToTable(ctx, object, tableOptions) } -func (r *Storage) toGenericResourceService(item unstructured.Unstructured, apiType *kmapi.ResourceID, cmeta *kmapi.ClusterMetadata) (*rscoreapi.GenericResourceService, error) { +func (r *Storage) toGenericResourceService(ctx context.Context, item unstructured.Unstructured, apiType *kmapi.ResourceID, cmeta *kmapi.ClusterMetadata) (*rscoreapi.GenericResourceService, error) { content := item.UnstructuredContent() objID := kmapi.NewObjectID(&item) @@ -347,7 +347,7 @@ func (r *Storage) toGenericResourceService(item unstructured.Unstructured, apiTy } { - rid, objs, err := graph.ExecQuery(r.kc, oid, sharedapi.ResourceLocator{ + rid, objs, err := graph.ExecQuery(ctx, r.kc, oid, sharedapi.ResourceLocator{ Ref: metav1.GroupKind{ Group: "", Kind: "Service", @@ -388,7 +388,7 @@ func (r *Storage) toGenericResourceService(item unstructured.Unstructured, apiTy } } if apiType.Group == "kubedb.com" { - rid, objs, err := graph.ExecQuery(r.kc, oid, sharedapi.ResourceLocator{ + rid, objs, err := graph.ExecQuery(ctx, r.kc, oid, sharedapi.ResourceLocator{ Ref: metav1.GroupKind{ Group: "catalog.appscode.com", Kind: apiType.Kind + "Binding", @@ -448,7 +448,7 @@ func (r *Storage) toGenericResourceService(item unstructured.Unstructured, apiTy } } { - rid, refs, err := graph.ExecRawQuery(r.kc, oid, sharedapi.ResourceLocator{ + rid, refs, err := graph.ExecRawQuery(ctx, r.kc, oid, sharedapi.ResourceLocator{ Ref: metav1.GroupKind{ Group: "stash.appscode.com", Kind: "BackupSession", @@ -476,7 +476,7 @@ func (r *Storage) toGenericResourceService(item unstructured.Unstructured, apiTy } } if genres.Spec.Facilities.Backup.Usage == rscoreapi.FacilityUnknown { - rid, refs, err := graph.ExecRawQuery(r.kc, oid, sharedapi.ResourceLocator{ + rid, refs, err := graph.ExecRawQuery(ctx, r.kc, oid, sharedapi.ResourceLocator{ Ref: metav1.GroupKind{ Group: "core.kubestash.com", Kind: "BackupConfiguration", @@ -497,7 +497,7 @@ func (r *Storage) toGenericResourceService(item unstructured.Unstructured, apiTy } } { - rid, refs, err := graph.ExecRawQuery(r.kc, oid, sharedapi.ResourceLocator{ + rid, refs, err := graph.ExecRawQuery(ctx, r.kc, oid, sharedapi.ResourceLocator{ Ref: metav1.GroupKind{ Group: "monitoring.coreos.com", Kind: "ServiceMonitor", @@ -525,7 +525,7 @@ func (r *Storage) toGenericResourceService(item unstructured.Unstructured, apiTy } if genres.Spec.Facilities.Monitoring.Usage == rscoreapi.FacilityUnknown { - rid, refs, err = graph.ExecRawQuery(r.kc, oid, sharedapi.ResourceLocator{ + rid, refs, err = graph.ExecRawQuery(ctx, r.kc, oid, sharedapi.ResourceLocator{ Ref: metav1.GroupKind{ Group: "monitoring.coreos.com", Kind: "PodMonitor", @@ -575,7 +575,7 @@ func (r *Storage) toGenericResourceService(item unstructured.Unstructured, apiTy result = strings.TrimSpace(result) cond = strings.EqualFold(result, "true") } else if exec.If.Connected != nil { - _, targets, err := graph.ExecRawQuery(r.kc, oid, *exec.If.Connected) + _, targets, err := graph.ExecRawQuery(ctx, r.kc, oid, *exec.If.Connected) if err != nil { return nil, errors.Wrapf(err, "failed to check connection for %+v exec with alias %s", gvr, exec.Alias) } diff --git a/pkg/registry/meta/render/storage.go b/pkg/registry/meta/render/storage.go index 29b315c302..bd6d1e9045 100644 --- a/pkg/registry/meta/render/storage.go +++ b/pkg/registry/meta/render/storage.go @@ -22,7 +22,6 @@ import ( "kubeops.dev/ui-server/pkg/graph" - openvizcs "go.openviz.dev/apimachinery/client/clientset/versioned" apierrors "k8s.io/apimachinery/pkg/api/errors" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -39,7 +38,6 @@ import ( type Storage struct { kc client.Client - oc openvizcs.Interface a authorizer.Authorizer } @@ -51,10 +49,9 @@ var ( _ rest.SingularNameProvider = &Storage{} ) -func NewStorage(kc client.Client, oc openvizcs.Interface, a authorizer.Authorizer) *Storage { +func NewStorage(kc client.Client, a authorizer.Authorizer) *Storage { return &Storage{ kc: kc, - oc: oc, a: a, } } @@ -107,7 +104,7 @@ func (r *Storage) Create(ctx context.Context, obj runtime.Object, _ rest.Validat autoColumns = true } - bv, err := graph.RenderPageBlock(r.kc, r.oc, req.Source, req.Block, req.ConvertToTable) + bv, err := graph.RenderPageBlock(graph.NewUserContext(ctx), r.kc, req.Source, req.Block, req.ConvertToTable) if err != nil { return nil, err } @@ -121,8 +118,8 @@ func (r *Storage) Create(ctx context.Context, obj runtime.Object, _ rest.Validat renderBlocks.Insert(string(k)) } rv, err := graph.RenderLayout( + graph.NewUserContext(ctx), r.kc, - r.oc, req.Source, req.LayoutName, // optional req.PageName, // optional diff --git a/pkg/registry/meta/renderdashboard/storage.go b/pkg/registry/meta/renderdashboard/storage.go index 893c42002a..62462d022d 100644 --- a/pkg/registry/meta/renderdashboard/storage.go +++ b/pkg/registry/meta/renderdashboard/storage.go @@ -23,7 +23,6 @@ import ( "kubeops.dev/ui-server/pkg/graph" - openvizcs "go.openviz.dev/apimachinery/client/clientset/versioned" apierrors "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" @@ -39,7 +38,6 @@ import ( type Storage struct { kc client.Client - oc openvizcs.Interface } var ( @@ -50,10 +48,9 @@ var ( _ rest.SingularNameProvider = &Storage{} ) -func NewStorage(kc client.Client, oc openvizcs.Interface) *Storage { +func NewStorage(kc client.Client) *Storage { return &Storage{ kc: kc, - oc: oc, } } @@ -132,7 +129,13 @@ func (r *Storage) Create(ctx context.Context, obj runtime.Object, _ rest.Validat } } - dg, err := graph.RenderDashboard(r.kc, r.oc, rd, src, req.EmbeddedLink) + utx := graph.NewUserContext(ctx) + cc, err := graph.NewClient(utx, r.kc, true) + if err != nil { + return nil, err + } + + dg, err := graph.RenderDashboard(utx, cc, rd, src, req.EmbeddedLink) if err != nil { return nil, err } diff --git a/pkg/registry/meta/resourcequery/storage.go b/pkg/registry/meta/resourcequery/storage.go index afdd5f9ccf..2dfa724fc8 100644 --- a/pkg/registry/meta/resourcequery/storage.go +++ b/pkg/registry/meta/resourcequery/storage.go @@ -106,7 +106,7 @@ func (r *Storage) Create(ctx context.Context, obj runtime.Object, _ rest.Validat src := kmapi.NewObjectID(&out) if req.OutputFormat == rsapi.OutputFormatRef { - _, refs, err := graph.ExecRawQuery(r.kc, src.OID(), *req.Target) + _, refs, err := graph.ExecRawQuery(graph.NewUserContext(ctx), r.kc, src.OID(), *req.Target) if err != nil { return nil, err } @@ -116,7 +116,7 @@ func (r *Storage) Create(ctx context.Context, obj runtime.Object, _ rest.Validat } in.Response = &runtime.RawExtension{Raw: data} } else { - rid2, items, err := graph.ExecQuery(r.kc, src.OID(), *req.Target) + rid2, items, err := graph.ExecQuery(graph.NewUserContext(ctx), r.kc, src.OID(), *req.Target) if err != nil { return nil, err } diff --git a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/clientset.go b/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/clientset.go deleted file mode 100644 index dbe6f58ae5..0000000000 --- a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/clientset.go +++ /dev/null @@ -1,133 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package versioned - -import ( - "fmt" - "net/http" - - openvizv1alpha1 "go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1" - uiv1alpha1 "go.openviz.dev/apimachinery/client/clientset/versioned/typed/ui/v1alpha1" - discovery "k8s.io/client-go/discovery" - rest "k8s.io/client-go/rest" - flowcontrol "k8s.io/client-go/util/flowcontrol" -) - -type Interface interface { - Discovery() discovery.DiscoveryInterface - OpenvizV1alpha1() openvizv1alpha1.OpenvizV1alpha1Interface - UiV1alpha1() uiv1alpha1.UiV1alpha1Interface -} - -// Clientset contains the clients for groups. -type Clientset struct { - *discovery.DiscoveryClient - openvizV1alpha1 *openvizv1alpha1.OpenvizV1alpha1Client - uiV1alpha1 *uiv1alpha1.UiV1alpha1Client -} - -// OpenvizV1alpha1 retrieves the OpenvizV1alpha1Client -func (c *Clientset) OpenvizV1alpha1() openvizv1alpha1.OpenvizV1alpha1Interface { - return c.openvizV1alpha1 -} - -// UiV1alpha1 retrieves the UiV1alpha1Client -func (c *Clientset) UiV1alpha1() uiv1alpha1.UiV1alpha1Interface { - return c.uiV1alpha1 -} - -// Discovery retrieves the DiscoveryClient -func (c *Clientset) Discovery() discovery.DiscoveryInterface { - if c == nil { - return nil - } - return c.DiscoveryClient -} - -// NewForConfig creates a new Clientset for the given config. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfig will generate a rate-limiter in configShallowCopy. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*Clientset, error) { - configShallowCopy := *c - - if configShallowCopy.UserAgent == "" { - configShallowCopy.UserAgent = rest.DefaultKubernetesUserAgent() - } - - // share the transport between all clients - httpClient, err := rest.HTTPClientFor(&configShallowCopy) - if err != nil { - return nil, err - } - - return NewForConfigAndClient(&configShallowCopy, httpClient) -} - -// NewForConfigAndClient creates a new Clientset for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -// If config's RateLimiter is not set and QPS and Burst are acceptable, -// NewForConfigAndClient will generate a rate-limiter in configShallowCopy. -func NewForConfigAndClient(c *rest.Config, httpClient *http.Client) (*Clientset, error) { - configShallowCopy := *c - if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 { - if configShallowCopy.Burst <= 0 { - return nil, fmt.Errorf("burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0") - } - configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst) - } - - var cs Clientset - var err error - cs.openvizV1alpha1, err = openvizv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - cs.uiV1alpha1, err = uiv1alpha1.NewForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - - cs.DiscoveryClient, err = discovery.NewDiscoveryClientForConfigAndClient(&configShallowCopy, httpClient) - if err != nil { - return nil, err - } - return &cs, nil -} - -// NewForConfigOrDie creates a new Clientset for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *Clientset { - cs, err := NewForConfig(c) - if err != nil { - panic(err) - } - return cs -} - -// New creates a new Clientset for the given RESTClient. -func New(c rest.Interface) *Clientset { - var cs Clientset - cs.openvizV1alpha1 = openvizv1alpha1.New(c) - cs.uiV1alpha1 = uiv1alpha1.New(c) - - cs.DiscoveryClient = discovery.NewDiscoveryClient(c) - return &cs -} diff --git a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/scheme/doc.go b/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/scheme/doc.go deleted file mode 100644 index 47c55e4037..0000000000 --- a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/scheme/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package contains the scheme of the automatically generated clientset. -package scheme diff --git a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/scheme/register.go b/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/scheme/register.go deleted file mode 100644 index c4413bdd5a..0000000000 --- a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/scheme/register.go +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package scheme - -import ( - openvizv1alpha1 "go.openviz.dev/apimachinery/apis/openviz/v1alpha1" - uiv1alpha1 "go.openviz.dev/apimachinery/apis/ui/v1alpha1" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - schema "k8s.io/apimachinery/pkg/runtime/schema" - serializer "k8s.io/apimachinery/pkg/runtime/serializer" - utilruntime "k8s.io/apimachinery/pkg/util/runtime" -) - -var Scheme = runtime.NewScheme() -var Codecs = serializer.NewCodecFactory(Scheme) -var ParameterCodec = runtime.NewParameterCodec(Scheme) -var localSchemeBuilder = runtime.SchemeBuilder{ - openvizv1alpha1.AddToScheme, - uiv1alpha1.AddToScheme, -} - -// AddToScheme adds all types of this clientset into the given scheme. This allows composition -// of clientsets, like in: -// -// import ( -// "k8s.io/client-go/kubernetes" -// clientsetscheme "k8s.io/client-go/kubernetes/scheme" -// aggregatorclientsetscheme "k8s.io/kube-aggregator/pkg/client/clientset_generated/clientset/scheme" -// ) -// -// kclientset, _ := kubernetes.NewForConfig(c) -// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme) -// -// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types -// correctly. -var AddToScheme = localSchemeBuilder.AddToScheme - -func init() { - v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"}) - utilruntime.Must(AddToScheme(Scheme)) -} diff --git a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/doc.go b/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/doc.go deleted file mode 100644 index 50f5242205..0000000000 --- a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/generated_expansion.go b/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/generated_expansion.go deleted file mode 100644 index 435c250494..0000000000 --- a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type GrafanaDashboardExpansion interface{} - -type GrafanaDashboardTemplateExpansion interface{} - -type GrafanaDatasourceExpansion interface{} diff --git a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/grafanadashboard.go b/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/grafanadashboard.go deleted file mode 100644 index 0d01553fa3..0000000000 --- a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/grafanadashboard.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - "time" - - v1alpha1 "go.openviz.dev/apimachinery/apis/openviz/v1alpha1" - scheme "go.openviz.dev/apimachinery/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// GrafanaDashboardsGetter has a method to return a GrafanaDashboardInterface. -// A group's client should implement this interface. -type GrafanaDashboardsGetter interface { - GrafanaDashboards(namespace string) GrafanaDashboardInterface -} - -// GrafanaDashboardInterface has methods to work with GrafanaDashboard resources. -type GrafanaDashboardInterface interface { - Create(ctx context.Context, grafanaDashboard *v1alpha1.GrafanaDashboard, opts v1.CreateOptions) (*v1alpha1.GrafanaDashboard, error) - Update(ctx context.Context, grafanaDashboard *v1alpha1.GrafanaDashboard, opts v1.UpdateOptions) (*v1alpha1.GrafanaDashboard, error) - UpdateStatus(ctx context.Context, grafanaDashboard *v1alpha1.GrafanaDashboard, opts v1.UpdateOptions) (*v1alpha1.GrafanaDashboard, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.GrafanaDashboard, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.GrafanaDashboardList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GrafanaDashboard, err error) - GrafanaDashboardExpansion -} - -// grafanaDashboards implements GrafanaDashboardInterface -type grafanaDashboards struct { - client rest.Interface - ns string -} - -// newGrafanaDashboards returns a GrafanaDashboards -func newGrafanaDashboards(c *OpenvizV1alpha1Client, namespace string) *grafanaDashboards { - return &grafanaDashboards{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the grafanaDashboard, and returns the corresponding grafanaDashboard object, and an error if there is any. -func (c *grafanaDashboards) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.GrafanaDashboard, err error) { - result = &v1alpha1.GrafanaDashboard{} - err = c.client.Get(). - Namespace(c.ns). - Resource("grafanadashboards"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of GrafanaDashboards that match those selectors. -func (c *grafanaDashboards) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.GrafanaDashboardList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.GrafanaDashboardList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("grafanadashboards"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested grafanaDashboards. -func (c *grafanaDashboards) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("grafanadashboards"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a grafanaDashboard and creates it. Returns the server's representation of the grafanaDashboard, and an error, if there is any. -func (c *grafanaDashboards) Create(ctx context.Context, grafanaDashboard *v1alpha1.GrafanaDashboard, opts v1.CreateOptions) (result *v1alpha1.GrafanaDashboard, err error) { - result = &v1alpha1.GrafanaDashboard{} - err = c.client.Post(). - Namespace(c.ns). - Resource("grafanadashboards"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(grafanaDashboard). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a grafanaDashboard and updates it. Returns the server's representation of the grafanaDashboard, and an error, if there is any. -func (c *grafanaDashboards) Update(ctx context.Context, grafanaDashboard *v1alpha1.GrafanaDashboard, opts v1.UpdateOptions) (result *v1alpha1.GrafanaDashboard, err error) { - result = &v1alpha1.GrafanaDashboard{} - err = c.client.Put(). - Namespace(c.ns). - Resource("grafanadashboards"). - Name(grafanaDashboard.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(grafanaDashboard). - Do(ctx). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *grafanaDashboards) UpdateStatus(ctx context.Context, grafanaDashboard *v1alpha1.GrafanaDashboard, opts v1.UpdateOptions) (result *v1alpha1.GrafanaDashboard, err error) { - result = &v1alpha1.GrafanaDashboard{} - err = c.client.Put(). - Namespace(c.ns). - Resource("grafanadashboards"). - Name(grafanaDashboard.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(grafanaDashboard). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the grafanaDashboard and deletes it. Returns an error if one occurs. -func (c *grafanaDashboards) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("grafanadashboards"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *grafanaDashboards) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("grafanadashboards"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched grafanaDashboard. -func (c *grafanaDashboards) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GrafanaDashboard, err error) { - result = &v1alpha1.GrafanaDashboard{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("grafanadashboards"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/grafanadashboardtemplate.go b/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/grafanadashboardtemplate.go deleted file mode 100644 index 880f5c0087..0000000000 --- a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/grafanadashboardtemplate.go +++ /dev/null @@ -1,178 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - "time" - - v1alpha1 "go.openviz.dev/apimachinery/apis/openviz/v1alpha1" - scheme "go.openviz.dev/apimachinery/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// GrafanaDashboardTemplatesGetter has a method to return a GrafanaDashboardTemplateInterface. -// A group's client should implement this interface. -type GrafanaDashboardTemplatesGetter interface { - GrafanaDashboardTemplates(namespace string) GrafanaDashboardTemplateInterface -} - -// GrafanaDashboardTemplateInterface has methods to work with GrafanaDashboardTemplate resources. -type GrafanaDashboardTemplateInterface interface { - Create(ctx context.Context, grafanaDashboardTemplate *v1alpha1.GrafanaDashboardTemplate, opts v1.CreateOptions) (*v1alpha1.GrafanaDashboardTemplate, error) - Update(ctx context.Context, grafanaDashboardTemplate *v1alpha1.GrafanaDashboardTemplate, opts v1.UpdateOptions) (*v1alpha1.GrafanaDashboardTemplate, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.GrafanaDashboardTemplate, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.GrafanaDashboardTemplateList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GrafanaDashboardTemplate, err error) - GrafanaDashboardTemplateExpansion -} - -// grafanaDashboardTemplates implements GrafanaDashboardTemplateInterface -type grafanaDashboardTemplates struct { - client rest.Interface - ns string -} - -// newGrafanaDashboardTemplates returns a GrafanaDashboardTemplates -func newGrafanaDashboardTemplates(c *OpenvizV1alpha1Client, namespace string) *grafanaDashboardTemplates { - return &grafanaDashboardTemplates{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the grafanaDashboardTemplate, and returns the corresponding grafanaDashboardTemplate object, and an error if there is any. -func (c *grafanaDashboardTemplates) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.GrafanaDashboardTemplate, err error) { - result = &v1alpha1.GrafanaDashboardTemplate{} - err = c.client.Get(). - Namespace(c.ns). - Resource("grafanadashboardtemplates"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of GrafanaDashboardTemplates that match those selectors. -func (c *grafanaDashboardTemplates) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.GrafanaDashboardTemplateList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.GrafanaDashboardTemplateList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("grafanadashboardtemplates"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested grafanaDashboardTemplates. -func (c *grafanaDashboardTemplates) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("grafanadashboardtemplates"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a grafanaDashboardTemplate and creates it. Returns the server's representation of the grafanaDashboardTemplate, and an error, if there is any. -func (c *grafanaDashboardTemplates) Create(ctx context.Context, grafanaDashboardTemplate *v1alpha1.GrafanaDashboardTemplate, opts v1.CreateOptions) (result *v1alpha1.GrafanaDashboardTemplate, err error) { - result = &v1alpha1.GrafanaDashboardTemplate{} - err = c.client.Post(). - Namespace(c.ns). - Resource("grafanadashboardtemplates"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(grafanaDashboardTemplate). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a grafanaDashboardTemplate and updates it. Returns the server's representation of the grafanaDashboardTemplate, and an error, if there is any. -func (c *grafanaDashboardTemplates) Update(ctx context.Context, grafanaDashboardTemplate *v1alpha1.GrafanaDashboardTemplate, opts v1.UpdateOptions) (result *v1alpha1.GrafanaDashboardTemplate, err error) { - result = &v1alpha1.GrafanaDashboardTemplate{} - err = c.client.Put(). - Namespace(c.ns). - Resource("grafanadashboardtemplates"). - Name(grafanaDashboardTemplate.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(grafanaDashboardTemplate). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the grafanaDashboardTemplate and deletes it. Returns an error if one occurs. -func (c *grafanaDashboardTemplates) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("grafanadashboardtemplates"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *grafanaDashboardTemplates) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("grafanadashboardtemplates"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched grafanaDashboardTemplate. -func (c *grafanaDashboardTemplates) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GrafanaDashboardTemplate, err error) { - result = &v1alpha1.GrafanaDashboardTemplate{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("grafanadashboardtemplates"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/grafanadatasource.go b/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/grafanadatasource.go deleted file mode 100644 index c197085f25..0000000000 --- a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/grafanadatasource.go +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - "time" - - v1alpha1 "go.openviz.dev/apimachinery/apis/openviz/v1alpha1" - scheme "go.openviz.dev/apimachinery/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - types "k8s.io/apimachinery/pkg/types" - watch "k8s.io/apimachinery/pkg/watch" - rest "k8s.io/client-go/rest" -) - -// GrafanaDatasourcesGetter has a method to return a GrafanaDatasourceInterface. -// A group's client should implement this interface. -type GrafanaDatasourcesGetter interface { - GrafanaDatasources(namespace string) GrafanaDatasourceInterface -} - -// GrafanaDatasourceInterface has methods to work with GrafanaDatasource resources. -type GrafanaDatasourceInterface interface { - Create(ctx context.Context, grafanaDatasource *v1alpha1.GrafanaDatasource, opts v1.CreateOptions) (*v1alpha1.GrafanaDatasource, error) - Update(ctx context.Context, grafanaDatasource *v1alpha1.GrafanaDatasource, opts v1.UpdateOptions) (*v1alpha1.GrafanaDatasource, error) - UpdateStatus(ctx context.Context, grafanaDatasource *v1alpha1.GrafanaDatasource, opts v1.UpdateOptions) (*v1alpha1.GrafanaDatasource, error) - Delete(ctx context.Context, name string, opts v1.DeleteOptions) error - DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error - Get(ctx context.Context, name string, opts v1.GetOptions) (*v1alpha1.GrafanaDatasource, error) - List(ctx context.Context, opts v1.ListOptions) (*v1alpha1.GrafanaDatasourceList, error) - Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) - Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GrafanaDatasource, err error) - GrafanaDatasourceExpansion -} - -// grafanaDatasources implements GrafanaDatasourceInterface -type grafanaDatasources struct { - client rest.Interface - ns string -} - -// newGrafanaDatasources returns a GrafanaDatasources -func newGrafanaDatasources(c *OpenvizV1alpha1Client, namespace string) *grafanaDatasources { - return &grafanaDatasources{ - client: c.RESTClient(), - ns: namespace, - } -} - -// Get takes name of the grafanaDatasource, and returns the corresponding grafanaDatasource object, and an error if there is any. -func (c *grafanaDatasources) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1alpha1.GrafanaDatasource, err error) { - result = &v1alpha1.GrafanaDatasource{} - err = c.client.Get(). - Namespace(c.ns). - Resource("grafanadatasources"). - Name(name). - VersionedParams(&options, scheme.ParameterCodec). - Do(ctx). - Into(result) - return -} - -// List takes label and field selectors, and returns the list of GrafanaDatasources that match those selectors. -func (c *grafanaDatasources) List(ctx context.Context, opts v1.ListOptions) (result *v1alpha1.GrafanaDatasourceList, err error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - result = &v1alpha1.GrafanaDatasourceList{} - err = c.client.Get(). - Namespace(c.ns). - Resource("grafanadatasources"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Do(ctx). - Into(result) - return -} - -// Watch returns a watch.Interface that watches the requested grafanaDatasources. -func (c *grafanaDatasources) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) { - var timeout time.Duration - if opts.TimeoutSeconds != nil { - timeout = time.Duration(*opts.TimeoutSeconds) * time.Second - } - opts.Watch = true - return c.client.Get(). - Namespace(c.ns). - Resource("grafanadatasources"). - VersionedParams(&opts, scheme.ParameterCodec). - Timeout(timeout). - Watch(ctx) -} - -// Create takes the representation of a grafanaDatasource and creates it. Returns the server's representation of the grafanaDatasource, and an error, if there is any. -func (c *grafanaDatasources) Create(ctx context.Context, grafanaDatasource *v1alpha1.GrafanaDatasource, opts v1.CreateOptions) (result *v1alpha1.GrafanaDatasource, err error) { - result = &v1alpha1.GrafanaDatasource{} - err = c.client.Post(). - Namespace(c.ns). - Resource("grafanadatasources"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(grafanaDatasource). - Do(ctx). - Into(result) - return -} - -// Update takes the representation of a grafanaDatasource and updates it. Returns the server's representation of the grafanaDatasource, and an error, if there is any. -func (c *grafanaDatasources) Update(ctx context.Context, grafanaDatasource *v1alpha1.GrafanaDatasource, opts v1.UpdateOptions) (result *v1alpha1.GrafanaDatasource, err error) { - result = &v1alpha1.GrafanaDatasource{} - err = c.client.Put(). - Namespace(c.ns). - Resource("grafanadatasources"). - Name(grafanaDatasource.Name). - VersionedParams(&opts, scheme.ParameterCodec). - Body(grafanaDatasource). - Do(ctx). - Into(result) - return -} - -// UpdateStatus was generated because the type contains a Status member. -// Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). -func (c *grafanaDatasources) UpdateStatus(ctx context.Context, grafanaDatasource *v1alpha1.GrafanaDatasource, opts v1.UpdateOptions) (result *v1alpha1.GrafanaDatasource, err error) { - result = &v1alpha1.GrafanaDatasource{} - err = c.client.Put(). - Namespace(c.ns). - Resource("grafanadatasources"). - Name(grafanaDatasource.Name). - SubResource("status"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(grafanaDatasource). - Do(ctx). - Into(result) - return -} - -// Delete takes name of the grafanaDatasource and deletes it. Returns an error if one occurs. -func (c *grafanaDatasources) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error { - return c.client.Delete(). - Namespace(c.ns). - Resource("grafanadatasources"). - Name(name). - Body(&opts). - Do(ctx). - Error() -} - -// DeleteCollection deletes a collection of objects. -func (c *grafanaDatasources) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error { - var timeout time.Duration - if listOpts.TimeoutSeconds != nil { - timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second - } - return c.client.Delete(). - Namespace(c.ns). - Resource("grafanadatasources"). - VersionedParams(&listOpts, scheme.ParameterCodec). - Timeout(timeout). - Body(&opts). - Do(ctx). - Error() -} - -// Patch applies the patch and returns the patched grafanaDatasource. -func (c *grafanaDatasources) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1alpha1.GrafanaDatasource, err error) { - result = &v1alpha1.GrafanaDatasource{} - err = c.client.Patch(pt). - Namespace(c.ns). - Resource("grafanadatasources"). - Name(name). - SubResource(subresources...). - VersionedParams(&opts, scheme.ParameterCodec). - Body(data). - Do(ctx). - Into(result) - return -} diff --git a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/openviz_client.go b/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/openviz_client.go deleted file mode 100644 index 7252ed9468..0000000000 --- a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1/openviz_client.go +++ /dev/null @@ -1,117 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "net/http" - - v1alpha1 "go.openviz.dev/apimachinery/apis/openviz/v1alpha1" - "go.openviz.dev/apimachinery/client/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type OpenvizV1alpha1Interface interface { - RESTClient() rest.Interface - GrafanaDashboardsGetter - GrafanaDashboardTemplatesGetter - GrafanaDatasourcesGetter -} - -// OpenvizV1alpha1Client is used to interact with features provided by the openviz.dev group. -type OpenvizV1alpha1Client struct { - restClient rest.Interface -} - -func (c *OpenvizV1alpha1Client) GrafanaDashboards(namespace string) GrafanaDashboardInterface { - return newGrafanaDashboards(c, namespace) -} - -func (c *OpenvizV1alpha1Client) GrafanaDashboardTemplates(namespace string) GrafanaDashboardTemplateInterface { - return newGrafanaDashboardTemplates(c, namespace) -} - -func (c *OpenvizV1alpha1Client) GrafanaDatasources(namespace string) GrafanaDatasourceInterface { - return newGrafanaDatasources(c, namespace) -} - -// NewForConfig creates a new OpenvizV1alpha1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*OpenvizV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new OpenvizV1alpha1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*OpenvizV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &OpenvizV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new OpenvizV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *OpenvizV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new OpenvizV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *OpenvizV1alpha1Client { - return &OpenvizV1alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *OpenvizV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/ui/v1alpha1/dashboardgroup.go b/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/ui/v1alpha1/dashboardgroup.go deleted file mode 100644 index ebe4af1794..0000000000 --- a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/ui/v1alpha1/dashboardgroup.go +++ /dev/null @@ -1,64 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "context" - - v1alpha1 "go.openviz.dev/apimachinery/apis/ui/v1alpha1" - scheme "go.openviz.dev/apimachinery/client/clientset/versioned/scheme" - v1 "k8s.io/apimachinery/pkg/apis/meta/v1" - rest "k8s.io/client-go/rest" -) - -// DashboardGroupsGetter has a method to return a DashboardGroupInterface. -// A group's client should implement this interface. -type DashboardGroupsGetter interface { - DashboardGroups() DashboardGroupInterface -} - -// DashboardGroupInterface has methods to work with DashboardGroup resources. -type DashboardGroupInterface interface { - Create(ctx context.Context, dashboardGroup *v1alpha1.DashboardGroup, opts v1.CreateOptions) (*v1alpha1.DashboardGroup, error) - DashboardGroupExpansion -} - -// dashboardGroups implements DashboardGroupInterface -type dashboardGroups struct { - client rest.Interface -} - -// newDashboardGroups returns a DashboardGroups -func newDashboardGroups(c *UiV1alpha1Client) *dashboardGroups { - return &dashboardGroups{ - client: c.RESTClient(), - } -} - -// Create takes the representation of a dashboardGroup and creates it. Returns the server's representation of the dashboardGroup, and an error, if there is any. -func (c *dashboardGroups) Create(ctx context.Context, dashboardGroup *v1alpha1.DashboardGroup, opts v1.CreateOptions) (result *v1alpha1.DashboardGroup, err error) { - result = &v1alpha1.DashboardGroup{} - err = c.client.Post(). - Resource("dashboardgroups"). - VersionedParams(&opts, scheme.ParameterCodec). - Body(dashboardGroup). - Do(ctx). - Into(result) - return -} diff --git a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/ui/v1alpha1/doc.go b/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/ui/v1alpha1/doc.go deleted file mode 100644 index 50f5242205..0000000000 --- a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/ui/v1alpha1/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -// This package has the automatically generated typed clients. -package v1alpha1 diff --git a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/ui/v1alpha1/generated_expansion.go b/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/ui/v1alpha1/generated_expansion.go deleted file mode 100644 index 11dae311ae..0000000000 --- a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/ui/v1alpha1/generated_expansion.go +++ /dev/null @@ -1,21 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -type DashboardGroupExpansion interface{} diff --git a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/ui/v1alpha1/ui_client.go b/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/ui/v1alpha1/ui_client.go deleted file mode 100644 index 36e62c0649..0000000000 --- a/vendor/go.openviz.dev/apimachinery/client/clientset/versioned/typed/ui/v1alpha1/ui_client.go +++ /dev/null @@ -1,107 +0,0 @@ -/* -Copyright AppsCode Inc. and Contributors - -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. -*/ - -// Code generated by client-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - "net/http" - - v1alpha1 "go.openviz.dev/apimachinery/apis/ui/v1alpha1" - "go.openviz.dev/apimachinery/client/clientset/versioned/scheme" - rest "k8s.io/client-go/rest" -) - -type UiV1alpha1Interface interface { - RESTClient() rest.Interface - DashboardGroupsGetter -} - -// UiV1alpha1Client is used to interact with features provided by the ui.openviz.dev group. -type UiV1alpha1Client struct { - restClient rest.Interface -} - -func (c *UiV1alpha1Client) DashboardGroups() DashboardGroupInterface { - return newDashboardGroups(c) -} - -// NewForConfig creates a new UiV1alpha1Client for the given config. -// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient), -// where httpClient was generated with rest.HTTPClientFor(c). -func NewForConfig(c *rest.Config) (*UiV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - httpClient, err := rest.HTTPClientFor(&config) - if err != nil { - return nil, err - } - return NewForConfigAndClient(&config, httpClient) -} - -// NewForConfigAndClient creates a new UiV1alpha1Client for the given config and http client. -// Note the http client provided takes precedence over the configured transport values. -func NewForConfigAndClient(c *rest.Config, h *http.Client) (*UiV1alpha1Client, error) { - config := *c - if err := setConfigDefaults(&config); err != nil { - return nil, err - } - client, err := rest.RESTClientForConfigAndClient(&config, h) - if err != nil { - return nil, err - } - return &UiV1alpha1Client{client}, nil -} - -// NewForConfigOrDie creates a new UiV1alpha1Client for the given config and -// panics if there is an error in the config. -func NewForConfigOrDie(c *rest.Config) *UiV1alpha1Client { - client, err := NewForConfig(c) - if err != nil { - panic(err) - } - return client -} - -// New creates a new UiV1alpha1Client for the given RESTClient. -func New(c rest.Interface) *UiV1alpha1Client { - return &UiV1alpha1Client{c} -} - -func setConfigDefaults(config *rest.Config) error { - gv := v1alpha1.SchemeGroupVersion - config.GroupVersion = &gv - config.APIPath = "/apis" - config.NegotiatedSerializer = scheme.Codecs.WithoutConversion() - - if config.UserAgent == "" { - config.UserAgent = rest.DefaultKubernetesUserAgent() - } - - return nil -} - -// RESTClient returns a RESTClient that is used to communicate -// with API server by this client implementation. -func (c *UiV1alpha1Client) RESTClient() rest.Interface { - if c == nil { - return nil - } - return c.restClient -} diff --git a/vendor/kmodules.xyz/client-go/api/v1/cluster.go b/vendor/kmodules.xyz/client-go/api/v1/cluster.go index 079bceb34d..b40cd8d1ef 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/cluster.go +++ b/vendor/kmodules.xyz/client-go/api/v1/cluster.go @@ -35,12 +35,21 @@ const ( HostingProviderGeneric HostingProvider = "Generic" HostingProviderGKE HostingProvider = "GKE" HostingProviderLinode HostingProvider = "Linode" + HostingProviderAkamai HostingProvider = "Akamai" HostingProviderPacket HostingProvider = "Packet" HostingProviderRancher HostingProvider = "Rancher" HostingProviderScaleway HostingProvider = "Scaleway" HostingProviderVultr HostingProvider = "Vultr" ) +func (h HostingProvider) ConvertToPreferredProvider() HostingProvider { + switch h { + case HostingProviderLinode: + return HostingProviderAkamai + } + return h +} + const ( AceInfoConfigMapName = "ace-info" diff --git a/vendor/kmodules.xyz/client-go/client/delegated.go b/vendor/kmodules.xyz/client-go/client/delegated.go index fd36791a68..6a4c4eca76 100644 --- a/vendor/kmodules.xyz/client-go/client/delegated.go +++ b/vendor/kmodules.xyz/client-go/client/delegated.go @@ -18,6 +18,7 @@ package client import ( "context" + "net/http" "strings" apiutil2 "kmodules.xyz/client-go/client/apiutil" @@ -26,7 +27,9 @@ import ( "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apiserver/pkg/authentication/user" restclient "k8s.io/client-go/rest" + "k8s.io/client-go/transport" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/apiutil" ) @@ -36,6 +39,9 @@ import ( // NewDelegatingClientInput encapsulates the input parameters to create a new delegating client. type NewDelegatingClientInput struct { + config *restclient.Config + options client.Options + CacheReader client.Reader Client client.Client UncachedObjects []client.Object @@ -58,9 +64,11 @@ func NewDelegatingClient(in NewDelegatingClientInput) (client.Client, error) { uncachedGVKs[gvk] = struct{}{} } - return &delegatingClient{ - scheme: in.Client.Scheme(), - mapper: in.Client.RESTMapper(), + return &DelegatingClient{ + config: in.config, + options: in.options, + scheme: in.Client.Scheme(), + mapper: in.Client.RESTMapper(), Reader: &delegatingReader{ CacheReader: in.CacheReader, ClientReader: in.Client, @@ -75,7 +83,7 @@ func NewDelegatingClient(in NewDelegatingClientInput) (client.Client, error) { }, nil } -type delegatingClient struct { +type DelegatingClient struct { client.Reader client.Writer client.StatusClient @@ -83,25 +91,57 @@ type delegatingClient struct { scheme *runtime.Scheme mapper meta.RESTMapper + + config *restclient.Config + options client.Options +} + +func (d *DelegatingClient) RestConfig() *restclient.Config { + return d.config +} + +func (d *DelegatingClient) Impersonate(u user.Info) (*restclient.Config, client.Client, error) { + config := restclient.CopyConfig(d.config) + config.Impersonate = restclient.ImpersonationConfig{ + UserName: u.GetName(), + UID: u.GetUID(), + Groups: u.GetGroups(), + Extra: u.GetExtra(), + } + + // share the transport between all clients + optionsShallowCopy := d.options + if d.options.HTTPClient != nil { + optionsShallowCopy.HTTPClient = &http.Client{ + Transport: transport.NewImpersonatingRoundTripper(transport.ImpersonationConfig{ + UserName: u.GetName(), + UID: u.GetUID(), + Groups: u.GetGroups(), + Extra: u.GetExtra(), + }, d.options.HTTPClient.Transport), + } + } + cc, err := NewClient(config, optionsShallowCopy) + return config, cc, err } // GroupVersionKindFor returns the GroupVersionKind for the given object. -func (d *delegatingClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error) { +func (d *DelegatingClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error) { return apiutil.GVKForObject(obj, d.scheme) } // IsObjectNamespaced returns true if the GroupVersionKind of the object is namespaced. -func (d *delegatingClient) IsObjectNamespaced(obj runtime.Object) (bool, error) { +func (d *DelegatingClient) IsObjectNamespaced(obj runtime.Object) (bool, error) { return apiutil.IsObjectNamespaced(obj, d.scheme, d.mapper) } // Scheme returns the scheme this client is using. -func (d *delegatingClient) Scheme() *runtime.Scheme { +func (d *DelegatingClient) Scheme() *runtime.Scheme { return d.scheme } // RESTMapper returns the rest mapper this client is using. -func (d *delegatingClient) RESTMapper() meta.RESTMapper { +func (d *DelegatingClient) RESTMapper() meta.RESTMapper { return d.mapper } @@ -167,7 +207,7 @@ func (d *delegatingReader) List(ctx context.Context, list client.ObjectList, opt return d.CacheReader.List(ctx, list, opts...) } -func (d *delegatingClient) SubResource(subResource string) client.SubResourceClient { +func (d *DelegatingClient) SubResource(subResource string) client.SubResourceClient { return d.SubResourceClientConstructor.SubResource(subResource) } @@ -181,6 +221,8 @@ func NewClient(config *restclient.Config, options client.Options) (client.Client return nil, err } co := NewDelegatingClientInput{ + config: config, + options: options, Client: c, Cachable: cachable, } diff --git a/vendor/kmodules.xyz/monitoring-agent-api/api/v1/appbinding.go b/vendor/kmodules.xyz/monitoring-agent-api/api/v1/appbinding.go index ea27ea10d8..32796ef59a 100644 --- a/vendor/kmodules.xyz/monitoring-agent-api/api/v1/appbinding.go +++ b/vendor/kmodules.xyz/monitoring-agent-api/api/v1/appbinding.go @@ -61,10 +61,12 @@ type TLSConfig struct { } type PrometheusContext struct { - HubUID string `json:"hubUID,omitempty"` - ClusterUID string `json:"clusterUID"` - ProjectId string `json:"projectId,omitempty"` - Default bool `json:"default"` + HubUID string `json:"hubUID,omitempty"` + ClusterUID string `json:"clusterUID"` + ProjectId string `json:"projectId,omitempty"` + Default bool `json:"default"` + IssueToken bool `json:"issueToken,omitempty"` + ClientOrgID string `json:"clientOrgID,omitempty"` } type GrafanaContext struct { diff --git a/vendor/kmodules.xyz/monitoring-agent-api/api/v1/openapi_generated.go b/vendor/kmodules.xyz/monitoring-agent-api/api/v1/openapi_generated.go index a98bb2c930..e25773429d 100644 --- a/vendor/kmodules.xyz/monitoring-agent-api/api/v1/openapi_generated.go +++ b/vendor/kmodules.xyz/monitoring-agent-api/api/v1/openapi_generated.go @@ -389,6 +389,18 @@ func schema_kmodulesxyz_monitoring_agent_api_api_v1_PrometheusContext(ref common Format: "", }, }, + "issueToken": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, + "clientOrgID": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, }, Required: []string{"clusterUID", "default"}, }, diff --git a/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/openapi_generated.go b/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/openapi_generated.go index 1c55fc1c24..c50c8da964 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/openapi_generated.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/core/v1alpha1/openapi_generated.go @@ -20324,6 +20324,12 @@ func schema_resource_metadata_apis_core_v1alpha1_Service(ref common.ReferenceCal Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ResourceQuery"), }, }, + "impersonate": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"name", "ref", "query"}, }, @@ -21056,6 +21062,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref common Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ResourceQuery"), }, }, + "impersonate": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"ref", "query"}, }, diff --git a/vendor/kmodules.xyz/resource-metadata/apis/identity/v1alpha1/openapi_generated.go b/vendor/kmodules.xyz/resource-metadata/apis/identity/v1alpha1/openapi_generated.go index f94454fb27..20795b9899 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/identity/v1alpha1/openapi_generated.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/identity/v1alpha1/openapi_generated.go @@ -20358,6 +20358,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref common Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ResourceQuery"), }, }, + "impersonate": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"ref", "query"}, }, diff --git a/vendor/kmodules.xyz/resource-metadata/apis/management/v1alpha1/openapi_generated.go b/vendor/kmodules.xyz/resource-metadata/apis/management/v1alpha1/openapi_generated.go index 328afc2a6d..8829d0ac9f 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/management/v1alpha1/openapi_generated.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/management/v1alpha1/openapi_generated.go @@ -19804,6 +19804,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref common Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ResourceQuery"), }, }, + "impersonate": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"ref", "query"}, }, diff --git a/vendor/kmodules.xyz/resource-metadata/apis/meta/v1alpha1/openapi_generated.go b/vendor/kmodules.xyz/resource-metadata/apis/meta/v1alpha1/openapi_generated.go index e46825cd7c..ee4ca5c158 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/meta/v1alpha1/openapi_generated.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/meta/v1alpha1/openapi_generated.go @@ -20434,6 +20434,12 @@ func schema_resource_metadata_apis_meta_v1alpha1_PageBlockLayout(ref common.Refe Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ResourceQuery"), }, }, + "impersonate": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, "displayMode": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -20538,6 +20544,12 @@ func schema_resource_metadata_apis_meta_v1alpha1_PageBlockOutline(ref common.Ref Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ResourceQuery"), }, }, + "impersonate": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, "displayMode": { SchemaProps: spec.SchemaProps{ Type: []string{"string"}, @@ -24181,6 +24193,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref common Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ResourceQuery"), }, }, + "impersonate": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"ref", "query"}, }, diff --git a/vendor/kmodules.xyz/resource-metadata/apis/shared/openapi_generated.go b/vendor/kmodules.xyz/resource-metadata/apis/shared/openapi_generated.go index c378451217..7ca8bc9b6f 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/shared/openapi_generated.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/shared/openapi_generated.go @@ -777,6 +777,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref common Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ResourceQuery"), }, }, + "impersonate": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"ref", "query"}, }, diff --git a/vendor/kmodules.xyz/resource-metadata/apis/shared/types.go b/vendor/kmodules.xyz/resource-metadata/apis/shared/types.go index 930c6bf4bb..2d91b13702 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/shared/types.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/shared/types.go @@ -38,8 +38,9 @@ type DeploymentParameters struct { } type ResourceLocator struct { - Ref metav1.GroupKind `json:"ref"` - Query ResourceQuery `json:"query"` + Ref metav1.GroupKind `json:"ref"` + Query ResourceQuery `json:"query"` + Impersonate bool `json:"impersonate,omitempty"` } // +kubebuilder:validation:Enum=REST;GraphQL diff --git a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/openapi_generated.go b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/openapi_generated.go index aa03fb4b39..babdac0523 100644 --- a/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/openapi_generated.go +++ b/vendor/kmodules.xyz/resource-metadata/apis/ui/v1alpha1/openapi_generated.go @@ -19571,6 +19571,12 @@ func schema_kmodulesxyz_resource_metadata_apis_shared_ResourceLocator(ref common Ref: ref("kmodules.xyz/resource-metadata/apis/shared.ResourceQuery"), }, }, + "impersonate": { + SchemaProps: spec.SchemaProps{ + Type: []string{"boolean"}, + Format: "", + }, + }, }, Required: []string{"ref", "query"}, }, diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml index b40561554b..8e6c168658 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml @@ -71,6 +71,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcedescriptors.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcedescriptors.yaml index 11baf8a09b..39a4164890 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcedescriptors.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcedescriptors.yaml @@ -204,6 +204,8 @@ spec: type: string connected: properties: + impersonate: + type: boolean query: properties: byLabel: diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml index 787c7840eb..a33b5fd102 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml @@ -72,6 +72,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block @@ -321,6 +323,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block @@ -590,6 +594,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block @@ -832,6 +838,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block @@ -1110,6 +1118,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block diff --git a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml index 1ea281924f..3861c1ba60 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceoutlines.yaml @@ -159,6 +159,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block @@ -410,6 +412,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block @@ -681,6 +685,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block @@ -925,6 +931,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block @@ -1205,6 +1213,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block diff --git a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourcedashboards.yaml b/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourcedashboards.yaml index 58bdddecac..15bb0dbec8 100644 --- a/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourcedashboards.yaml +++ b/vendor/kmodules.xyz/resource-metadata/crds/ui.k8s.appscode.com_resourcedashboards.yaml @@ -48,6 +48,8 @@ spec: type: string connected: properties: + impersonate: + type: boolean query: properties: byLabel: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/clusterprofiles/ace/dbaas-generic.yaml b/vendor/kmodules.xyz/resource-metadata/hub/clusterprofiles/ace/dbaas-generic.yaml index d0a9858770..473a5a0239 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/clusterprofiles/ace/dbaas-generic.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/clusterprofiles/ace/dbaas-generic.yaml @@ -23,6 +23,7 @@ spec: - kube-prometheus-stack - monitoring-operator - panopticon + - prometheus-adapter opscenter-security: - cert-manager - cert-manager-csi-driver-cacerts diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/gatewayinfoes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/gatewayinfoes.yaml new file mode 100644 index 0000000000..5b13ab49cd --- /dev/null +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/gatewayinfoes.yaml @@ -0,0 +1,78 @@ +apiVersion: meta.k8s.appscode.com/v1alpha1 +kind: ResourceDescriptor +metadata: + creationTimestamp: null + labels: + k8s.io/group: meta.k8s.appscode.com + k8s.io/kind: GatewayInfo + k8s.io/resource: gatewayinfoes + k8s.io/version: v1alpha1 + name: meta.k8s.appscode.com-v1alpha1-gatewayinfoes +spec: + resource: + group: meta.k8s.appscode.com + kind: GatewayInfo + name: gatewayinfoes + scope: Namespaced + version: v1alpha1 + validation: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + properties: + name: + description: 'Name must be unique within a namespace. Is required when + creating resources, although some resources may allow a client to + request the generation of an appropriate name automatically. Name + is primarily intended for creation idempotence and configuration definition. + Cannot be updated. More info: http://kubernetes.io/docs/user-guide/identifiers#names' + type: string + namespace: + description: "Namespace defines the space within which each name must + be unique. An empty namespace is equivalent to the \"default\" namespace, + but \"default\" is the canonical representation. Not all objects are + required to be scoped to a namespace - the value of this field for + those objects will be empty. \n Must be a DNS_LABEL. Cannot be updated. + More info: http://kubernetes.io/docs/user-guide/namespaces" + type: string + labels: + additionalProperties: + type: string + description: 'Map of string keys and values that can be used to organize + and categorize (scope and select) objects. May match selectors of + replication controllers and services. More info: http://kubernetes.io/docs/user-guide/labels' + type: object + annotations: + additionalProperties: + type: string + description: 'Annotations is an unstructured key value map stored with + a resource that may be set by external tools to store and retrieve + arbitrary metadata. They are not queryable and should be preserved + when modifying objects. More info: http://kubernetes.io/docs/user-guide/annotations' + type: object + type: object + spec: + properties: + gatewayClassName: + type: string + hostName: + type: string + ip: + type: string + serviceType: + type: string + required: + - gatewayClassName + - serviceType + type: object + type: object diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/resourceblockdefinitions.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/resourceblockdefinitions.yaml index 143d5adb2e..f0b74e7930 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/resourceblockdefinitions.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/resourceblockdefinitions.yaml @@ -102,6 +102,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/resourcedescriptors.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/resourcedescriptors.yaml index c277f24436..f4dc38757a 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/resourcedescriptors.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/resourcedescriptors.yaml @@ -226,6 +226,8 @@ spec: type: string connected: properties: + impersonate: + type: boolean query: properties: byLabel: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/resourcelayouts.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/resourcelayouts.yaml index 13caee0ae9..e8858851d7 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/resourcelayouts.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/resourcelayouts.yaml @@ -103,6 +103,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block @@ -351,6 +353,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block @@ -616,6 +620,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block @@ -858,6 +864,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block @@ -1136,6 +1144,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/resourceoutlines.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/resourceoutlines.yaml index c6c3f9992c..977a6a65d8 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/resourceoutlines.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/meta.k8s.appscode.com/v1alpha1/resourceoutlines.yaml @@ -188,6 +188,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block @@ -438,6 +440,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block @@ -705,6 +709,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block @@ -949,6 +955,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block @@ -1229,6 +1237,8 @@ spec: - src type: object type: array + impersonate: + type: boolean kind: enum: - Block diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ui.k8s.appscode.com/v1alpha1/features.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ui.k8s.appscode.com/v1alpha1/features.yaml index ea3f2ea27d..bbd1520e86 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ui.k8s.appscode.com/v1alpha1/features.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ui.k8s.appscode.com/v1alpha1/features.yaml @@ -110,6 +110,11 @@ spec: featureBlock: description: FeatureBlock specifies the ui block name of this feature. type: string + featureExclusionGroup: + description: FeatureExclusionGroup specifies the name of the exclusion + group for features Only one feature in a feature exclusion group can + be installed + type: string featureSet: description: FeatureSet specifies the name of the FeatureSet where this feature belong to. diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ui.k8s.appscode.com/v1alpha1/resourcedashboards.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ui.k8s.appscode.com/v1alpha1/resourcedashboards.yaml index 47acd63ec4..c8400cb31d 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ui.k8s.appscode.com/v1alpha1/resourcedashboards.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcedescriptors/ui.k8s.appscode.com/v1alpha1/resourcedashboards.yaml @@ -64,6 +64,8 @@ spec: type: string connected: properties: + impersonate: + type: boolean query: properties: byLabel: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/gatewayinfoes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/gatewayinfoes.yaml new file mode 100644 index 0000000000..42383035dd --- /dev/null +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceeditors/meta.k8s.appscode.com/v1alpha1/gatewayinfoes.yaml @@ -0,0 +1,17 @@ +apiVersion: ui.k8s.appscode.com/v1alpha1 +kind: ResourceEditor +metadata: + creationTimestamp: null + labels: + k8s.io/group: meta.k8s.appscode.com + k8s.io/kind: GatewayInfo + k8s.io/resource: gatewayinfoes + k8s.io/version: v1alpha1 + name: meta.k8s.appscode.com-v1alpha1-gatewayinfoes +spec: + resource: + group: meta.k8s.appscode.com + kind: GatewayInfo + name: gatewayinfoes + scope: Namespaced + version: v1alpha1 diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/elasticsearches.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/elasticsearches.yaml index d90c6de2b6..6cd26ec53f 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/elasticsearches.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/elasticsearches.yaml @@ -31,6 +31,7 @@ spec: create: Never displayMode: List fieldPath: '{.response.dashboards[0].panels}' + impersonate: true kind: Connection name: Dashboards query: @@ -134,6 +135,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/kafkas.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/kafkas.yaml index 01e2eaf730..9634e76d17 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/kafkas.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/kafkas.yaml @@ -80,6 +80,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/mariadbs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/mariadbs.yaml index 938f9ad423..b00d573a97 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/mariadbs.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/mariadbs.yaml @@ -31,6 +31,7 @@ spec: create: Never displayMode: List fieldPath: '{.response.dashboards[0].panels}' + impersonate: true kind: Connection name: Dashboards query: @@ -134,6 +135,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/mongodbs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/mongodbs.yaml index 519e368f68..dc0139c66b 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/mongodbs.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/mongodbs.yaml @@ -34,6 +34,7 @@ spec: create: Never displayMode: List fieldPath: '{.response.dashboards[0].panels}' + impersonate: true kind: Connection name: Dashboards query: @@ -137,6 +138,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/mysqls.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/mysqls.yaml index 7117d93744..c840698a30 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/mysqls.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/mysqls.yaml @@ -31,6 +31,7 @@ spec: create: Never displayMode: List fieldPath: '{.response.dashboards[0].panels}' + impersonate: true kind: Connection name: Dashboards query: @@ -134,6 +135,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/perconaxtradbs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/perconaxtradbs.yaml index 34a8141794..fb1630a7d2 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/perconaxtradbs.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/perconaxtradbs.yaml @@ -31,6 +31,7 @@ spec: create: Never displayMode: List fieldPath: '{.response.dashboards[0].panels}' + impersonate: true kind: Connection name: Dashboards query: @@ -152,6 +153,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/pgbouncers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/pgbouncers.yaml index 8ee64011fd..f942dddf9a 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/pgbouncers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/pgbouncers.yaml @@ -31,6 +31,7 @@ spec: create: Never displayMode: List fieldPath: '{.response.dashboards[0].panels}' + impersonate: true kind: Connection name: Dashboards query: @@ -152,6 +153,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/postgreses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/postgreses.yaml index 0543df47d8..2f02373aa3 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/postgreses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/postgreses.yaml @@ -31,6 +31,7 @@ spec: create: Never displayMode: List fieldPath: '{.response.dashboards[0].panels}' + impersonate: true kind: Connection name: Dashboards query: @@ -152,6 +153,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/proxysqls.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/proxysqls.yaml index aaf967fe9c..40c44e0b38 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/proxysqls.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/proxysqls.yaml @@ -31,6 +31,7 @@ spec: create: Never displayMode: List fieldPath: '{.response.dashboards[0].panels}' + impersonate: true kind: Connection name: Dashboards query: @@ -111,6 +112,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/redises.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/redises.yaml index 27e7ab11a0..5f63ced194 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/redises.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1/kubedb/redises.yaml @@ -31,6 +31,7 @@ spec: create: Never displayMode: List fieldPath: '{.response.dashboards[0].panels}' + impersonate: true kind: Connection name: Dashboards query: @@ -134,6 +135,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/clickhouses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/clickhouses.yaml index cc98581fb6..a859e59d65 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/clickhouses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/clickhouses.yaml @@ -80,6 +80,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/druids.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/druids.yaml index 408ecd283e..2497df4f09 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/druids.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/druids.yaml @@ -80,6 +80,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/elasticsearches.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/elasticsearches.yaml index 3cf32746f5..33bac2d0a7 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/elasticsearches.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/elasticsearches.yaml @@ -31,6 +31,7 @@ spec: create: Never displayMode: List fieldPath: '{.response.dashboards[0].panels}' + impersonate: true kind: Connection name: Dashboards query: @@ -134,6 +135,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/ferretdbs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/ferretdbs.yaml index 0d20fbb9e3..a00a3a4859 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/ferretdbs.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/ferretdbs.yaml @@ -80,6 +80,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/kafkas.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/kafkas.yaml index 157a7e12ef..b99795905c 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/kafkas.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/kafkas.yaml @@ -80,6 +80,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mariadbs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mariadbs.yaml index a50f313686..13531faf7e 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mariadbs.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mariadbs.yaml @@ -31,6 +31,7 @@ spec: create: Never displayMode: List fieldPath: '{.response.dashboards[0].panels}' + impersonate: true kind: Connection name: Dashboards query: @@ -134,6 +135,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mongodbs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mongodbs.yaml index 5b69ec3c88..0d975b0ddc 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mongodbs.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mongodbs.yaml @@ -34,6 +34,7 @@ spec: create: Never displayMode: List fieldPath: '{.response.dashboards[0].panels}' + impersonate: true kind: Connection name: Dashboards query: @@ -137,6 +138,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mssqlservers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mssqlservers.yaml index 81028a35ae..5a372cfeed 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mssqlservers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mssqlservers.yaml @@ -80,6 +80,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mysqls.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mysqls.yaml index f23cd78171..b28a1dba55 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mysqls.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mysqls.yaml @@ -31,6 +31,7 @@ spec: create: Never displayMode: List fieldPath: '{.response.dashboards[0].panels}' + impersonate: true kind: Connection name: Dashboards query: @@ -134,6 +135,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/pgpool.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/pgpool.yaml index 17c492a500..1bf524fbe1 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/pgpool.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/pgpool.yaml @@ -80,6 +80,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/postgreses.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/postgreses.yaml index 753513b2e3..7283b6e23c 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/postgreses.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/postgreses.yaml @@ -31,6 +31,7 @@ spec: create: Never displayMode: List fieldPath: '{.response.dashboards[0].panels}' + impersonate: true kind: Connection name: Dashboards query: @@ -152,6 +153,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/proxysqls.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/proxysqls.yaml index f552524e0b..cd13c18764 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/proxysqls.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/proxysqls.yaml @@ -31,6 +31,7 @@ spec: create: Never displayMode: List fieldPath: '{.response.dashboards[0].panels}' + impersonate: true kind: Connection name: Dashboards query: @@ -111,6 +112,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/rabbitmqs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/rabbitmqs.yaml index 7f8199ba53..bfec0b93d4 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/rabbitmqs.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/rabbitmqs.yaml @@ -80,6 +80,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/redises.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/redises.yaml index c0c54a7cb8..b8d32bc350 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/redises.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/redises.yaml @@ -31,6 +31,7 @@ spec: create: Never displayMode: List fieldPath: '{.response.dashboards[0].panels}' + impersonate: true kind: Connection name: Dashboards query: @@ -134,6 +135,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/singlestores.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/singlestores.yaml index cd08b79c58..8ebd8f617f 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/singlestores.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/singlestores.yaml @@ -80,6 +80,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/solrs.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/solrs.yaml index 01cfebf077..49a39a9926 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/solrs.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/solrs.yaml @@ -80,6 +80,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/zookeepers.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/zookeepers.yaml index c13c26937e..d6ff8d4cbe 100644 --- a/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/zookeepers.yaml +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/zookeepers.yaml @@ -80,6 +80,7 @@ spec: create: Never displayMode: List fieldPath: .response.dashboards + impersonate: true kind: Connection name: Grafana Dashboards query: diff --git a/vendor/kmodules.xyz/resource-metadata/hub/resourcetabledefinitions/meta.k8s.appscode.com/v1alpha1/gatewayinfoes.yaml b/vendor/kmodules.xyz/resource-metadata/hub/resourcetabledefinitions/meta.k8s.appscode.com/v1alpha1/gatewayinfoes.yaml new file mode 100644 index 0000000000..7308840006 --- /dev/null +++ b/vendor/kmodules.xyz/resource-metadata/hub/resourcetabledefinitions/meta.k8s.appscode.com/v1alpha1/gatewayinfoes.yaml @@ -0,0 +1,18 @@ +apiVersion: meta.k8s.appscode.com/v1alpha1 +kind: ResourceTableDefinition +metadata: + creationTimestamp: null + labels: + k8s.io/group: meta.k8s.appscode.com + k8s.io/kind: GatewayInfo + k8s.io/resource: gatewayinfoes + k8s.io/version: v1alpha1 + name: meta.k8s.appscode.com-v1alpha1-gatewayinfoes +spec: + defaultView: true + resource: + group: meta.k8s.appscode.com + kind: GatewayInfo + name: gatewayinfoes + scope: Namespaced + version: v1alpha1 diff --git a/vendor/modules.txt b/vendor/modules.txt index 97642b4951..e8c5a57234 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -957,10 +957,6 @@ go.openviz.dev/apimachinery/apis/openviz go.openviz.dev/apimachinery/apis/openviz/v1alpha1 go.openviz.dev/apimachinery/apis/ui go.openviz.dev/apimachinery/apis/ui/v1alpha1 -go.openviz.dev/apimachinery/client/clientset/versioned -go.openviz.dev/apimachinery/client/clientset/versioned/scheme -go.openviz.dev/apimachinery/client/clientset/versioned/typed/openviz/v1alpha1 -go.openviz.dev/apimachinery/client/clientset/versioned/typed/ui/v1alpha1 go.openviz.dev/apimachinery/crds # go.starlark.net v0.0.0-20240520160348-046347dcd104 ## explicit; go 1.19 @@ -2020,7 +2016,7 @@ kmodules.xyz/authorizer/apiserver kmodules.xyz/authorizer/rbac kmodules.xyz/authorizer/rbac/helpers kmodules.xyz/authorizer/rbac/validation -# kmodules.xyz/client-go v0.30.37 +# kmodules.xyz/client-go v0.30.38 ## explicit; go 1.22.0 kmodules.xyz/client-go kmodules.xyz/client-go/api/v1 @@ -2047,7 +2043,7 @@ kmodules.xyz/custom-resources/crds # kmodules.xyz/go-containerregistry v0.0.12 ## explicit; go 1.21.5 kmodules.xyz/go-containerregistry/name -# kmodules.xyz/monitoring-agent-api v0.30.2 +# kmodules.xyz/monitoring-agent-api v0.30.4 ## explicit; go 1.22.0 kmodules.xyz/monitoring-agent-api/api/v1 kmodules.xyz/monitoring-agent-api/client @@ -2056,7 +2052,7 @@ kmodules.xyz/monitoring-agent-api/client kmodules.xyz/offshoot-api/api/v1 kmodules.xyz/offshoot-api/api/v2 kmodules.xyz/offshoot-api/util -# kmodules.xyz/resource-metadata v0.22.3-0.20241114091625-6c277c3fe863 +# kmodules.xyz/resource-metadata v0.22.3 ## explicit; go 1.22.1 kmodules.xyz/resource-metadata/apis/core/install kmodules.xyz/resource-metadata/apis/core/v1alpha1