Skip to content

Commit

Permalink
fix: Apply CheCluster patch (#2874)
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <[email protected]>
  • Loading branch information
tolusha authored Jun 17, 2024
1 parent 3d46be3 commit 2388cfa
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/tasks/che-cluster-tasks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,19 @@ export namespace CheClusterTasks {
merge(cheCluster, { spec: { devEnvironments: { startTimeoutSeconds: 3000 } } })
}

// override default values with patch file
await kubeHelper.createNamespacedCustomObject(flags[CHE_NAMESPACE_FLAG], EclipseChe.CHE_CLUSTER_API_GROUP, EclipseChe.CHE_CLUSTER_API_VERSION_V2, EclipseChe.CHE_CLUSTER_KIND_PLURAL, cheCluster, true)

if (ctx[EclipseCheContext.CR_PATCH]) {
merge(cheCluster, ctx[EclipseCheContext.CR_PATCH])
// merge(cheCluster, ctx[EclipseCheContext.CR_PATCH])
await kubeHelper.patchNamespacedCustomObject(
cheCluster.metadata.name!,
flags[CHE_NAMESPACE_FLAG],
ctx[EclipseCheContext.CR_PATCH],
EclipseChe.CHE_CLUSTER_API_GROUP,
EclipseChe.CHE_CLUSTER_API_VERSION_V2,
EclipseChe.CHE_CLUSTER_KIND_PLURAL)
}

await kubeHelper.createNamespacedCustomObject(flags[CHE_NAMESPACE_FLAG], EclipseChe.CHE_CLUSTER_API_GROUP, EclipseChe.CHE_CLUSTER_API_VERSION_V2, EclipseChe.CHE_CLUSTER_KIND_PLURAL, cheCluster, true)
task.title = `${task.title}...[Created]`
},
}
Expand Down

0 comments on commit 2388cfa

Please sign in to comment.