Skip to content

Commit eb4d246

Browse files
authored
Update cache.ts
1 parent e0127b4 commit eb4d246

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/cache.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export class ListWatch<T extends KubernetesObject> implements ObjectCache<T>, In
3838
private readonly listFn: ListPromise<T>,
3939
autoStart: boolean = true,
4040
private readonly labelSelector?: string,
41+
private readonly fieldSelector?: string,
4142
) {
4243
this.callbackCache[ADD] = [];
4344
this.callbackCache[UPDATE] = [];
@@ -169,10 +170,14 @@ export class ListWatch<T extends KubernetesObject> implements ObjectCache<T>, In
169170
} as {
170171
resourceVersion: string | undefined;
171172
labelSelector: string | undefined;
173+
fieldSelector: string | undefined;
172174
};
173175
if (this.labelSelector !== undefined) {
174176
queryParams.labelSelector = ObjectSerializer.serialize(this.labelSelector, 'string');
175177
}
178+
if (this.fieldSelector !== undefined) {
179+
queryParams.fieldSelector = ObjectSerializer.serialize(this.fieldSelector, 'string');
180+
}
176181
this.request = await this.watch.watch(
177182
this.path,
178183
queryParams,

0 commit comments

Comments
 (0)