Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <[email protected]>
  • Loading branch information
tolusha committed Sep 10, 2024
1 parent 176fc97 commit 8ae39b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/kube-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1041,10 +1041,10 @@ export class KubeClient {
async replaceCustomResourceDefinition(crd: V1CustomResourceDefinition): Promise<void> {
const k8sApi = this.kubeConfig.makeApiClient(ApiextensionsV1Api)
try {
const response = await k8sApi.readCustomResourceDefinition(crd.metadata?.name!)
const response = await k8sApi.readCustomResourceDefinition(crd.metadata!.name!)

crd.metadata!.resourceVersion = (response.body as any).metadata.resourceVersion
await k8sApi.replaceCustomResourceDefinition(crd.metadata?.name!, crd)
await k8sApi.replaceCustomResourceDefinition(crd.metadata!.name!, crd)
} catch (e: any) {
throw this.wrapK8sClientError(e)
}
Expand Down

0 comments on commit 8ae39b8

Please sign in to comment.