Skip to content

Commit 2d907a0

Browse files
authored
Merge pull request #996 from goenning/go/fix-metrics-interface
add labels to PodMetrics interface
2 parents d3ed6dd + ed60422 commit 2d907a0

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

src/metrics.ts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ export interface PodMetric {
1717
metadata: {
1818
name: string;
1919
namespace: string;
20-
selfLink: string;
20+
selfLink?: string;
2121
creationTimestamp: string;
22+
labels?: { [key: string]: string };
2223
};
2324
timestamp: string;
2425
window: string;
@@ -28,7 +29,7 @@ export interface PodMetric {
2829
export interface NodeMetric {
2930
metadata: {
3031
name: string;
31-
selfLink: string;
32+
selfLink?: string;
3233
creationTimestamp: string;
3334
};
3435
timestamp: string;
@@ -54,18 +55,9 @@ export interface NodeMetricsList {
5455
items: NodeMetric[];
5556
}
5657

57-
export interface SinglePodMetrics {
58+
export interface SinglePodMetrics extends PodMetric {
5859
kind: 'PodMetrics';
5960
apiVersion: 'metrics.k8s.io/v1beta1';
60-
metadata: {
61-
name: string;
62-
namespace: string;
63-
creationTimestamp: string;
64-
labels: { [key: string]: string };
65-
};
66-
timestamp: string;
67-
window: string;
68-
containers: ContainerMetric[];
6961
}
7062

7163
export class Metrics {

0 commit comments

Comments
 (0)