Skip to content

Conversation

@nicu-da
Copy link
Contributor

@nicu-da nicu-da commented Jan 22, 2026

[static]

same as #3653 but not it's a deployment, but we set the keep helm values for pvcs so they are not auto deleted

Pull Request Checklist

Cluster Testing

  • If a cluster test is required, comment /cluster_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.
  • If a hard-migration test is required (from the latest release), comment /hdm_test on this PR to request it, and ping someone with access to the DA-internal system to approve it.

PR Guidelines

  • Include any change that might be observable by our partners or affect their deployment in the release notes.
  • Specify fixed issues with Fixes #n, and mention issues worked on using #n
  • Include a screenshot for frontend-related PRs - see README or use your favorite screenshot tool

Merge Guidelines

  • Make the git commit message look sensible when squash-merging on GitHub (most likely: just copy your PR description).

[static]

Signed-off-by: Nicu Reut <nicu.reut@digitalasset.com>
@nicu-da nicu-da force-pushed the nicuda/techdebt/add_support_cometbft_hd branch from e98e128 to d767131 Compare January 22, 2026 17:35
Comment on lines -146 to -201
const svIdentifier = nodeConfigs.selfSvNodeName;
const svIdentifierWithMigration = `${svIdentifier}-m${migrationId}`;
let volumeDependecies: Resource[] = [];
if (svConfiguration?.cometbft?.snapshotName) {
const volumeSize = cometbftChartValues.db.volumeSize;
const diskSnapshot = gcp.compute.getSnapshot({
name: svConfiguration.cometbft.snapshotName,
});

if (!GCP_ZONE) {
throw new Error('Zone is required to create a disk');
}
const restoredDisk = new gcp.compute.Disk(
`${svIdentifierWithMigration}-cometbft-restored-data`,
{
name: `${svIdentifierWithMigration}-cometbft-restored-disk`,
// eslint-disable-next-line promise/prefer-await-to-then
size: diskSnapshot.then(snapshot => snapshot.diskSizeGb),
// eslint-disable-next-line promise/prefer-await-to-then
snapshot: diskSnapshot.then(snapshot => snapshot.selfLink),
type: 'pd-ssd',
zone: GCP_ZONE,
},
opts
);

// create the underlying persistent volume that will be used by cometbft from the state of an existing PV
volumeDependecies = [
new k8s.core.v1.PersistentVolume(
`${svIdentifier}-cometbft-data`,
{
metadata: {
name: `${svIdentifier}-cometbft-data-pv`,
},
spec: {
capacity: {
storage: volumeSize,
},
volumeMode: 'Filesystem',
accessModes: ['ReadWriteOnce'],
persistentVolumeReclaimPolicy: 'Delete',
storageClassName: cometbftChartValues.db.volumeStorageClass,
claimRef: {
name: `global-domain-${migrationId}-cometbft-cometbft-data`,
namespace: xns.ns.metadata.name,
},
csi: {
driver: 'pd.csi.storage.gke.io',
volumeHandle: restoredDisk.id,
},
},
},
opts
),
];
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just dead code we use for the cluster migration

Copy link
Contributor

@martinflorian-da martinflorian-da left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

kind: PersistentVolumeClaim
metadata:
name: {{ include "prefix" (list .Values "cometbft-data") }}
name: {{ .Values.db.pvcName | default (include "prefix" (list .Values "cometbft-data")) }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once again I bow before your bravery to change YAML without a test...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(looks fairly reasonable to me... but doesn't it always?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested manually but also added tests for everything now

[static]

Signed-off-by: Nicu Reut <nicu.reut@digitalasset.com>
@nicu-da nicu-da enabled auto-merge (squash) January 23, 2026 08:03
@nicu-da nicu-da merged commit ba1f484 into main Jan 23, 2026
44 checks passed
@nicu-da nicu-da deleted the nicuda/techdebt/add_support_cometbft_hd branch January 23, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants