mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix allowed resources checks on GKE (#6657)
* Add check for incomplete SelfSubjectRulesReview to fix GKE Signed-off-by: Sebastian Malton <sebastian@malton.name> * Adding namespaced for KubeApiResource Signed-off-by: Sebastian Malton <sebastian@malton.name> * Refactoring of AuthorizationNamespaceReview Signed-off-by: Sebastian Malton <sebastian@malton.name> * Removing dead code Signed-off-by: Sebastian Malton <sebastian@malton.name> * Refactoring ListApiResources Signed-off-by: Sebastian Malton <sebastian@malton.name> * Extract ClusterContext into deps for KubeObjectStore to fix circular import Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix remaining type errors Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix crash in frame by consolidating setup into runnables Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix type errors and remove dead code Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix core resources not showing up Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix namespaces not being shown Signed-off-by: Sebastian Malton <sebastian@malton.name> * Simplify ClusterContext to remove something only NamespaceStore needs Signed-off-by: Sebastian Malton <sebastian@malton.name> * Make sure the public API doesn't change Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix lint Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fixing namespace-select-filter tests Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix other tests requiring overrides Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix kludge in cluster-frame tests Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix remaining test failures Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix integration test due to incorrect casting Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix integration test and kube watches not working at all Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix secret details test Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix lint Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix non-ApplicationBuilder tests by adding overrides Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix crash due to trying to read hostedCluster too soon Signed-off-by: Sebastian Malton <sebastian@malton.name> * Fix crash due to timing issues - Make injectable phases more explicit for renderer Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
e36f3d2d70
commit
443081493b
196 files changed
+2379
-2146
No files matched your search
@@ -9,6 +9,7 @@ import { kubeObjectStoreInjectionToken } from "../../../common/k8s-api/api-manag
|
||||
import { storesAndApisCanBeCreatedInjectionToken } from "../../../common/k8s-api/stores-apis-can-be-created.token";
|
||||
import deploymentApiInjectable from "../../../common/k8s-api/endpoints/deployment.api.injectable";
|
||||
import { DeploymentStore } from "./store";
|
||||
import clusterFrameContextForNamespacedResourcesInjectable from "../../cluster-frame-context/for-namespaced-resources.injectable";
|
||||
|
||||
const deploymentStoreInjectable = getInjectable({
|
||||
id: "deployment-store",
|
||||
@@ -19,6 +20,7 @@ const deploymentStoreInjectable = getInjectable({
|
||||
|
||||
return new DeploymentStore({
|
||||
podStore: di.inject(podStoreInjectable),
|
||||
context: di.inject(clusterFrameContextForNamespacedResourcesInjectable),
|
||||
}, api);
|
||||
},
|
||||
injectionToken: kubeObjectStoreInjectionToken,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import type { PodStore } from "../+workloads-pods/store";
|
||||
import type { Deployment, DeploymentApi } from "../../../common/k8s-api/endpoints";
|
||||
import { PodStatusPhase } from "../../../common/k8s-api/endpoints";
|
||||
import type { KubeObjectStoreOptions } from "../../../common/k8s-api/kube-object.store";
|
||||
import type { KubeObjectStoreDependencies, KubeObjectStoreOptions } from "../../../common/k8s-api/kube-object.store";
|
||||
import { KubeObjectStore } from "../../../common/k8s-api/kube-object.store";
|
||||
|
||||
// This needs to be disables because of https://github.com/microsoft/TypeScript/issues/15300
|
||||
@@ -17,13 +17,13 @@ export type DeploymentStatuses = {
|
||||
pending: number;
|
||||
};
|
||||
|
||||
export interface DeploymentStoreDependencies {
|
||||
export interface DeploymentStoreDependencies extends KubeObjectStoreDependencies {
|
||||
readonly podStore: PodStore;
|
||||
}
|
||||
|
||||
export class DeploymentStore extends KubeObjectStore<Deployment, DeploymentApi> {
|
||||
constructor(protected readonly dependencies: DeploymentStoreDependencies, api: DeploymentApi, opts?: KubeObjectStoreOptions) {
|
||||
super(api, opts);
|
||||
super(dependencies, api, opts);
|
||||
}
|
||||
|
||||
protected sortItems(items: Deployment[]) {
|
||||
|
||||
Reference in new issue
Block a user