Skip to content

Commit

Permalink
add labels to PodMetrics interface
Browse files Browse the repository at this point in the history
  • Loading branch information
goenning committed Feb 23, 2023
1 parent d3ed6dd commit ed60422
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/metrics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ export interface PodMetric {
metadata: {
name: string;
namespace: string;
selfLink: string;
selfLink?: string;
creationTimestamp: string;
labels?: { [key: string]: string };
};
timestamp: string;
window: string;
Expand All @@ -28,7 +29,7 @@ export interface PodMetric {
export interface NodeMetric {
metadata: {
name: string;
selfLink: string;
selfLink?: string;
creationTimestamp: string;
};
timestamp: string;
Expand All @@ -54,18 +55,9 @@ export interface NodeMetricsList {
items: NodeMetric[];
}

export interface SinglePodMetrics {
export interface SinglePodMetrics extends PodMetric {
kind: 'PodMetrics';
apiVersion: 'metrics.k8s.io/v1beta1';
metadata: {
name: string;
namespace: string;
creationTimestamp: string;
labels: { [key: string]: string };
};
timestamp: string;
window: string;
containers: ContainerMetric[];
}

export class Metrics {
Expand Down

0 comments on commit ed60422

Please sign in to comment.