diff --git a/apis/core/v1alpha1/openapi_generated.go b/apis/core/v1alpha1/openapi_generated.go index 1c55fc1c2..c50c8da96 100644 --- a/apis/core/v1alpha1/openapi_generated.go +++ b/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/apis/identity/v1alpha1/openapi_generated.go b/apis/identity/v1alpha1/openapi_generated.go index f94454fb2..20795b989 100644 --- a/apis/identity/v1alpha1/openapi_generated.go +++ b/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/apis/management/v1alpha1/openapi_generated.go b/apis/management/v1alpha1/openapi_generated.go index 328afc2a6..8829d0ac9 100644 --- a/apis/management/v1alpha1/openapi_generated.go +++ b/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/apis/meta/v1alpha1/openapi_generated.go b/apis/meta/v1alpha1/openapi_generated.go index e46825cd7..ee4ca5c15 100644 --- a/apis/meta/v1alpha1/openapi_generated.go +++ b/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/apis/node/v1alpha1/openapi_generated.go b/apis/node/v1alpha1/openapi_generated.go index 99bd34679..99c3aec53 100644 --- a/apis/node/v1alpha1/openapi_generated.go +++ b/apis/node/v1alpha1/openapi_generated.go @@ -19770,6 +19770,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/apis/shared/openapi_generated.go b/apis/shared/openapi_generated.go index c37845121..7ca8bc9b6 100644 --- a/apis/shared/openapi_generated.go +++ b/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/apis/shared/types.go b/apis/shared/types.go index 930c6bf4b..2d91b1370 100644 --- a/apis/shared/types.go +++ b/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/apis/ui/v1alpha1/openapi_generated.go b/apis/ui/v1alpha1/openapi_generated.go index aa03fb4b3..babdac052 100644 --- a/apis/ui/v1alpha1/openapi_generated.go +++ b/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/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml b/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml index b40561554..8e6c16865 100644 --- a/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml +++ b/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/crds/meta.k8s.appscode.com_resourcedescriptors.yaml b/crds/meta.k8s.appscode.com_resourcedescriptors.yaml index 11baf8a09..39a416489 100644 --- a/crds/meta.k8s.appscode.com_resourcedescriptors.yaml +++ b/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/crds/meta.k8s.appscode.com_resourcelayouts.yaml b/crds/meta.k8s.appscode.com_resourcelayouts.yaml index 787c7840e..a33b5fd10 100644 --- a/crds/meta.k8s.appscode.com_resourcelayouts.yaml +++ b/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/crds/meta.k8s.appscode.com_resourceoutlines.yaml b/crds/meta.k8s.appscode.com_resourceoutlines.yaml index 1ea281924..3861c1ba6 100644 --- a/crds/meta.k8s.appscode.com_resourceoutlines.yaml +++ b/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/crds/ui.k8s.appscode.com_resourcedashboards.yaml b/crds/ui.k8s.appscode.com_resourcedashboards.yaml index 58bdddeca..15bb0dbec 100644 --- a/crds/ui.k8s.appscode.com_resourcedashboards.yaml +++ b/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/go.mod b/go.mod index 95ce80f81..967068753 100644 --- a/go.mod +++ b/go.mod @@ -29,7 +29,7 @@ require ( k8s.io/klog/v2 v2.130.1 k8s.io/kube-openapi v0.0.0-20240703190633-0aa61b46e8c2 kmodules.xyz/apiversion v0.2.0 - kmodules.xyz/client-go v0.30.37 + kmodules.xyz/client-go v0.30.38-0.20241117075231-750051a8f0b9 kmodules.xyz/crd-schema-fuzz v0.29.1 kmodules.xyz/go-containerregistry v0.0.12 kmodules.xyz/offshoot-api v0.30.1 @@ -127,6 +127,7 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.1.0 // indirect + k8s.io/apiserver v0.30.2 // indirect k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect diff --git a/go.sum b/go.sum index 813bf4226..e8104093b 100644 --- a/go.sum +++ b/go.sum @@ -322,6 +322,8 @@ k8s.io/apiextensions-apiserver v0.30.2 h1:l7Eue2t6QiLHErfn2vwK4KgF4NeDgjQkCXtEbO k8s.io/apiextensions-apiserver v0.30.2/go.mod h1:lsJFLYyK40iguuinsb3nt+Sj6CmodSI4ACDLep1rgjw= k8s.io/apimachinery v0.30.2 h1:fEMcnBj6qkzzPGSVsAZtQThU62SmQ4ZymlXRC5yFSCg= k8s.io/apimachinery v0.30.2/go.mod h1:iexa2somDaxdnj7bha06bhb43Zpa6eWH8N8dbqVjTUc= +k8s.io/apiserver v0.30.2 h1:ACouHiYl1yFI2VFI3YGM+lvxgy6ir4yK2oLOsLI1/tw= +k8s.io/apiserver v0.30.2/go.mod h1:BOTdFBIch9Sv0ypSEcUR6ew/NUFGocRFNl72Ra7wTm8= k8s.io/client-go v0.30.2 h1:sBIVJdojUNPDU/jObC+18tXWcTJVcwyqS9diGdWHk50= k8s.io/client-go v0.30.2/go.mod h1:JglKSWULm9xlJLx4KCkfLLQ7XwtlbflV6uFFSHTMgVs= k8s.io/klog/v2 v2.130.1 h1:n9Xl7H1Xvksem4KFG4PYbdQCQxqc/tTUyrgXaOhHSzk= @@ -332,8 +334,8 @@ k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCI k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= kmodules.xyz/apiversion v0.2.0 h1:vAQYqZFm4xu4pbB1cAdHbFEPES6EQkcR4wc06xdTOWk= kmodules.xyz/apiversion v0.2.0/go.mod h1:oPX8g8LvlPdPX3Yc5YvCzJHQnw3YF/X4/jdW0b1am80= -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-0.20241117075231-750051a8f0b9 h1:8qSZylUUBcY1rKlVLgm3mRjw3/mG8QT0tSuCCflmIeU= +kmodules.xyz/client-go v0.30.38-0.20241117075231-750051a8f0b9/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/go-containerregistry v0.0.12 h1:Tl32QGmSqRVm9PUEb/f3dgDeu9zW5fVzt3qmAFIE37I= diff --git a/hub/resourceoutlines/kubedb.com/v1/kubedb/elasticsearches.yaml b/hub/resourceoutlines/kubedb.com/v1/kubedb/elasticsearches.yaml index d90c6de2b..6cd26ec53 100644 --- a/hub/resourceoutlines/kubedb.com/v1/kubedb/elasticsearches.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1/kubedb/kafkas.yaml b/hub/resourceoutlines/kubedb.com/v1/kubedb/kafkas.yaml index 01e2eaf73..9634e76d1 100644 --- a/hub/resourceoutlines/kubedb.com/v1/kubedb/kafkas.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1/kubedb/mariadbs.yaml b/hub/resourceoutlines/kubedb.com/v1/kubedb/mariadbs.yaml index 938f9ad42..b00d573a9 100644 --- a/hub/resourceoutlines/kubedb.com/v1/kubedb/mariadbs.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1/kubedb/mongodbs.yaml b/hub/resourceoutlines/kubedb.com/v1/kubedb/mongodbs.yaml index 519e368f6..dc0139c66 100644 --- a/hub/resourceoutlines/kubedb.com/v1/kubedb/mongodbs.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1/kubedb/mysqls.yaml b/hub/resourceoutlines/kubedb.com/v1/kubedb/mysqls.yaml index 7117d9374..c840698a3 100644 --- a/hub/resourceoutlines/kubedb.com/v1/kubedb/mysqls.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1/kubedb/perconaxtradbs.yaml b/hub/resourceoutlines/kubedb.com/v1/kubedb/perconaxtradbs.yaml index 34a814179..fb1630a7d 100644 --- a/hub/resourceoutlines/kubedb.com/v1/kubedb/perconaxtradbs.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1/kubedb/pgbouncers.yaml b/hub/resourceoutlines/kubedb.com/v1/kubedb/pgbouncers.yaml index 8ee64011f..f942dddf9 100644 --- a/hub/resourceoutlines/kubedb.com/v1/kubedb/pgbouncers.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1/kubedb/postgreses.yaml b/hub/resourceoutlines/kubedb.com/v1/kubedb/postgreses.yaml index 0543df47d..2f02373aa 100644 --- a/hub/resourceoutlines/kubedb.com/v1/kubedb/postgreses.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1/kubedb/proxysqls.yaml b/hub/resourceoutlines/kubedb.com/v1/kubedb/proxysqls.yaml index aaf967fe9..40c44e0b3 100644 --- a/hub/resourceoutlines/kubedb.com/v1/kubedb/proxysqls.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1/kubedb/redises.yaml b/hub/resourceoutlines/kubedb.com/v1/kubedb/redises.yaml index 27e7ab11a..5f63ced19 100644 --- a/hub/resourceoutlines/kubedb.com/v1/kubedb/redises.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/clickhouses.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/clickhouses.yaml index cc98581fb..a859e59d6 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/clickhouses.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/druids.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/druids.yaml index 408ecd283..2497df4f0 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/druids.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/elasticsearches.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/elasticsearches.yaml index 3cf32746f..33bac2d0a 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/elasticsearches.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/ferretdbs.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/ferretdbs.yaml index 0d20fbb9e..a00a3a485 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/ferretdbs.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/kafkas.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/kafkas.yaml index 157a7e12e..b99795905 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/kafkas.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mariadbs.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mariadbs.yaml index a50f31368..13531faf7 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mariadbs.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mongodbs.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mongodbs.yaml index 5b69ec3c8..0d975b0dd 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mongodbs.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mssqlservers.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mssqlservers.yaml index 81028a35a..5a372cfee 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mssqlservers.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mysqls.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mysqls.yaml index f23cd7817..b28a1dba5 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/mysqls.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/pgpool.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/pgpool.yaml index 17c492a50..1bf524fbe 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/pgpool.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/postgreses.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/postgreses.yaml index 753513b2e..7283b6e23 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/postgreses.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/proxysqls.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/proxysqls.yaml index f552524e0..cd13c1876 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/proxysqls.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/rabbitmqs.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/rabbitmqs.yaml index 7f8199ba5..bfec0b93d 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/rabbitmqs.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/redises.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/redises.yaml index c0c54a7cb..b8d32bc35 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/redises.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/singlestores.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/singlestores.yaml index cd08b79c5..8ebd8f617 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/singlestores.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/solrs.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/solrs.yaml index 01cfebf07..49a39a992 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/solrs.yaml +++ b/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/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/zookeepers.yaml b/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/zookeepers.yaml index c13c26937..d6ff8d4cb 100644 --- a/hub/resourceoutlines/kubedb.com/v1alpha2/kubedb/zookeepers.yaml +++ b/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/k8s.io/apiserver/LICENSE b/vendor/k8s.io/apiserver/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/vendor/k8s.io/apiserver/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/vendor/k8s.io/apiserver/pkg/authentication/user/doc.go b/vendor/k8s.io/apiserver/pkg/authentication/user/doc.go new file mode 100644 index 000000000..3d87fd72c --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/authentication/user/doc.go @@ -0,0 +1,19 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +// Package user contains utilities for dealing with simple user exchange in the auth +// packages. The user.Info interface defines an interface for exchanging that info. +package user // import "k8s.io/apiserver/pkg/authentication/user" diff --git a/vendor/k8s.io/apiserver/pkg/authentication/user/user.go b/vendor/k8s.io/apiserver/pkg/authentication/user/user.go new file mode 100644 index 000000000..4d6ec0980 --- /dev/null +++ b/vendor/k8s.io/apiserver/pkg/authentication/user/user.go @@ -0,0 +1,84 @@ +/* +Copyright 2014 The Kubernetes Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package user + +// Info describes a user that has been authenticated to the system. +type Info interface { + // GetName returns the name that uniquely identifies this user among all + // other active users. + GetName() string + // GetUID returns a unique value for a particular user that will change + // if the user is removed from the system and another user is added with + // the same name. + GetUID() string + // GetGroups returns the names of the groups the user is a member of + GetGroups() []string + + // GetExtra can contain any additional information that the authenticator + // thought was interesting. One example would be scopes on a token. + // Keys in this map should be namespaced to the authenticator or + // authenticator/authorizer pair making use of them. + // For instance: "example.org/foo" instead of "foo" + // This is a map[string][]string because it needs to be serializeable into + // a SubjectAccessReviewSpec.authorization.k8s.io for proper authorization + // delegation flows + // In order to faithfully round-trip through an impersonation flow, these keys + // MUST be lowercase. + GetExtra() map[string][]string +} + +// DefaultInfo provides a simple user information exchange object +// for components that implement the UserInfo interface. +type DefaultInfo struct { + Name string + UID string + Groups []string + Extra map[string][]string +} + +func (i *DefaultInfo) GetName() string { + return i.Name +} + +func (i *DefaultInfo) GetUID() string { + return i.UID +} + +func (i *DefaultInfo) GetGroups() []string { + return i.Groups +} + +func (i *DefaultInfo) GetExtra() map[string][]string { + return i.Extra +} + +// well-known user and group names +const ( + SystemPrivilegedGroup = "system:masters" + NodesGroup = "system:nodes" + MonitoringGroup = "system:monitoring" + AllUnauthenticated = "system:unauthenticated" + AllAuthenticated = "system:authenticated" + + Anonymous = "system:anonymous" + APIServerUser = "system:apiserver" + + // core kubernetes process identities + KubeProxy = "system:kube-proxy" + KubeControllerManager = "system:kube-controller-manager" + KubeScheduler = "system:kube-scheduler" +) diff --git a/vendor/kmodules.xyz/client-go/api/v1/cluster.go b/vendor/kmodules.xyz/client-go/api/v1/cluster.go index 079bceb34..b40cd8d1e 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 fd36791a6..445ecf09d 100644 --- a/vendor/kmodules.xyz/client-go/client/delegated.go +++ b/vendor/kmodules.xyz/client-go/client/delegated.go @@ -26,6 +26,7 @@ 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" "sigs.k8s.io/controller-runtime/pkg/client" "sigs.k8s.io/controller-runtime/pkg/client/apiutil" @@ -36,6 +37,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 +62,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 +81,7 @@ func NewDelegatingClient(in NewDelegatingClientInput) (client.Client, error) { }, nil } -type delegatingClient struct { +type DelegatingClient struct { client.Reader client.Writer client.StatusClient @@ -83,25 +89,43 @@ 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) (client.Client, error) { + config := restclient.CopyConfig(d.config) + config.Impersonate = restclient.ImpersonationConfig{ + UserName: u.GetName(), + UID: u.GetUID(), + Groups: u.GetGroups(), + Extra: u.GetExtra(), + } + return NewClient(config, d.options) } // 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 +191,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 +205,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/modules.txt b/vendor/modules.txt index cfcd21687..08a51ba53 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -562,6 +562,9 @@ k8s.io/apimachinery/pkg/version k8s.io/apimachinery/pkg/watch k8s.io/apimachinery/third_party/forked/golang/json k8s.io/apimachinery/third_party/forked/golang/reflect +# k8s.io/apiserver v0.30.2 +## explicit; go 1.22.0 +k8s.io/apiserver/pkg/authentication/user # k8s.io/client-go v0.30.2 ## explicit; go 1.22.0 k8s.io/client-go/applyconfigurations/admissionregistration/v1 @@ -742,7 +745,7 @@ k8s.io/utils/trace # kmodules.xyz/apiversion v0.2.0 ## explicit; go 1.14 kmodules.xyz/apiversion -# kmodules.xyz/client-go v0.30.37 +# kmodules.xyz/client-go v0.30.38-0.20241117075231-750051a8f0b9 ## explicit; go 1.22.0 kmodules.xyz/client-go kmodules.xyz/client-go/api/v1