Skip to content

Commit 79a3308

Browse files
Revert to naming HelmReleases by UUID (#601)
2 parents ed09b87 + 6b045d1 commit 79a3308

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

acs-cluster-manager/lib/actions.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,14 @@ export class Update extends Action {
201201
const cluster = cluster_template({ uuid, name });
202202
const values = jmp.merge(cluster.values, spec.values ?? {});
203203
/* Build the cluster HelmRelease manifest */
204+
/* It would be better to use a more sensible name here. But this
205+
* breaks back-compat; flux is unable to handle a situation
206+
* where one HelmRelease is replaced by another with a different
207+
* name but they deploy the same resources. */
204208
const helm = template.helm({
205209
...cluster,
206210
uuid, values,
207-
name: k8sname("edge-cluster", name),
211+
name: k8sname("edge-cluster", uuid),
208212
prefix: "edge-cluster",
209213
source: "helm-charts"
210214
}).template;

acs-edge-sync/lib/deployments.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,12 @@ export class Deployments {
217217
name: spec.name,
218218
hostname: spec.hostname,
219219
});
220-
const hr_name = k8sname(chart.prefix ?? chart.chart, spec.name);
220+
/* It would be better to use a more sensible name here.
221+
* But this breaks back-compat; flux is unable to handle
222+
* a situation where one HelmRelease is replaced by
223+
* another with a different name but they deploy the
224+
* same resources. */
225+
const hr_name = k8sname(chart.prefix ?? chart.chart, uuid);
221226
const gr_name = k8sname("helm", chart.source ?? "charts");
222227

223228
const hr = templates.get(res.HelmRelease)({

0 commit comments

Comments
 (0)