Skip to content

Commit

Permalink
fix: persist vcluster data
Browse files Browse the repository at this point in the history
  • Loading branch information
waveywaves committed Feb 12, 2024
1 parent 1318837 commit ac7f30f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/helm/build/vcluster/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ func BuildK3SHelmValues(uCluster *v1alpha1.UffizziCluster) (vcluster.K3S, string
Common: common(helmReleaseName, vclusterIngressHostname),
}

// keep cluster data intact in case the vcluster scales up or down
vclusterK3sHelmValues.Storage.Persistence = true
if uCluster.Spec.ExternalDatastore == constants.ETCD {
vclusterK3sHelmValues.VCluster.Env = []vcluster.ContainerEnv{
{
Name: constants.K3S_DATASTORE_ENDPOINT,
Value: "http://" + etcd.BuildEtcdHelmReleaseName(uCluster) + "." + uCluster.Namespace + ".svc.cluster.local:2379",
},
}
vclusterK3sHelmValues.Storage.Persistence = true
vclusterK3sHelmValues.EnableHA = false
}

Expand Down

0 comments on commit ac7f30f

Please sign in to comment.