File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,16 @@ import { PatchStrategy } from './patch.js';
19
19
/** Kubernetes API verbs. */
20
20
type KubernetesApiAction = 'create' | 'delete' | 'patch' | 'read' | 'list' | 'replace' ;
21
21
22
+ type KubernetesObjectHeader < T extends KubernetesObject | KubernetesObject > = Pick <
23
+ T ,
24
+ 'apiVersion' | 'kind'
25
+ > & {
26
+ metadata : {
27
+ name : string ;
28
+ namespace ?: string ;
29
+ } ;
30
+ } ;
31
+
22
32
interface GroupVersion {
23
33
group : string ;
24
34
version : string ;
@@ -278,7 +288,7 @@ export class KubernetesObjectApi {
278
288
* @return Promise containing the request response and [[KubernetesObject]].
279
289
*/
280
290
public async read < T extends KubernetesObject | KubernetesObject > (
281
- spec : T ,
291
+ spec : KubernetesObjectHeader < T > ,
282
292
pretty ?: string ,
283
293
exact ?: boolean ,
284
294
exportt ?: boolean ,
You can’t perform that action at this time.
0 commit comments