Skip to content

Commit

Permalink
new k8up implementation has now also hostnames suffixed with -*-preba…
Browse files Browse the repository at this point in the history
…ckuppod
  • Loading branch information
Schnitzel committed May 29, 2019
1 parent 39e04b2 commit 6d8c3d5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async function resticbackupSnapshotFinished(webhook: WebhookRequestData) {
const newSnapshots = R.pipe(
R.reject(snapshot => R.contains(snapshot.id, existingBackupIds)),
// Remove pod names suffix from hostnames.
R.map(R.over(R.lensProp('hostname'), R.replace(/(-cli|-mariadb|-nginx|-solr|-node|-elasticsearch|-redis)$/, ''))),
R.map(R.over(R.lensProp('hostname'), R.replace(/(-cli|-mariadb|-nginx|-solr|-node|-elasticsearch|-redis|-[\w]+-prebackuppod)$/, ''))),
R.groupBy(snapshot => snapshot.hostname),
R.toPairs()
)(incomingSnapshots);
Expand Down

0 comments on commit 6d8c3d5

Please sign in to comment.