-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement KubeObjectStatusText extension API #1188
Conversation
why not just: export interface ResourceStatusRegistration {
kind: string;
apiVersions: string[];
resolver: (object: KubeObject) => ResourceStatus | null;
} where |
Much better...will change it. |
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
b6693ac
to
9faea88
Compare
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
Now all resource lists are using new |
src/renderer/components/kube-resource-status-icon/kube-resource-status-icon.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
@@ -2,6 +2,7 @@ export { isAllowedResource } from "../../common/rbac" | |||
export { apiManager } from "../../renderer/api/api-manager"; | |||
export { KubeObjectStore } from "../../renderer/kube-object.store" | |||
export { KubeApi, forCluster, IKubeApiCluster } from "../../renderer/api/kube-api"; | |||
export type { EventStore } from "../../renderer/components/+events/event.store" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need a separate issue about missing store types?
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
…xtensions Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
{ | ||
kind: "ReplicaSet", | ||
apiVersions: ["v1"], | ||
resolve: (object: K8sApi.KubeObject) => resolveStatus(object) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why some of these use specific types and other use generic KubeObject
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolveStatusFromPods
and resolveStatusFromCronJobs
requires specific type. I've changed this now to use always specific type to be more consistent.
@@ -29,3 +30,15 @@ export { Role, roleApi } from "../../renderer/api/endpoints"; | |||
export { RoleBinding, roleBindingApi } from "../../renderer/api/endpoints"; | |||
export { ClusterRole, clusterRoleApi } from "../../renderer/api/endpoints"; | |||
export { ClusterRoleBinding, clusterRoleBindingApi } from "../../renderer/api/endpoints"; | |||
|
|||
export type KubeObjectStatus = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does not feel right to have them here, everything else is exported from somewhere outside.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved these types to separate file where those are exported from now
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
Tests are now again green. @jakolehm PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Just realised this PR was missing docs. |
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
Fixes #1118
Usage
Signed-off-by: Lauri Nevala lauri.nevala@gmail.com