Skip to content

Commit

Permalink
fix: Apply CheCluster patch
Browse files Browse the repository at this point in the history
Signed-off-by: Anatolii Bazko <[email protected]>
  • Loading branch information
tolusha committed Jun 14, 2024
1 parent 3d46be3 commit f2f2633
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 f2f2633

Please sign in to comment.