Skip to content

Commit

Permalink
Also invoke removePreviewDNSRecord during cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mads-hartmann committed Apr 27, 2022
1 parent b1a1f3a commit 40239be
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .werft/platform-delete-preview-environments-cron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ async function deletePreviewEnvironments() {
promises.push(
removeCertificate(preview, CORE_DEV_KUBECONFIG_PATH),
removeStagingDNSRecord(preview),
wipePreviewEnvironmentAndNamespace(helmInstallName, preview, CORE_DEV_KUBECONFIG_PATH, { slice: `Deleting preview ${preview}` }))
removePreviewDNSRecord(preview),
wipePreviewEnvironmentAndNamespace(helmInstallName, preview, CORE_DEV_KUBECONFIG_PATH, { slice: `Deleting preview ${preview}` })
)
})
await Promise.all(promises)
}
Expand Down Expand Up @@ -145,7 +147,7 @@ async function removeCertificate(preview: string, kubectlConfig: string) {
return
}

// remove DNS records on the old generation of preview environments
// remove DNS records for core-dev-based preview environments
async function removeStagingDNSRecord(preview: string) {
return Promise.all([
deleteDNSRecord('A', `*.ws-dev.${preview}.staging.gitpod-dev.com`, 'gitpod-dev', 'gitpod-dev-com'),
Expand All @@ -160,7 +162,7 @@ async function removeStagingDNSRecord(preview: string) {
])
}

// remove DNS records on the new (Harvester based) generation of preview environments
// remove DNS records for harvester-based preview environments
async function removePreviewDNSRecord(preview: string) {
return Promise.all([
deleteDNSRecord('A', `*.ws-dev.${preview}.preview.gitpod-dev.com`, 'gitpod-core-dev', 'preview-gitpod-dev-com'),
Expand Down

0 comments on commit 40239be

Please sign in to comment.