@leverege/build-tools 2.47.1 → 2.47.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leverege/build-tools",
3
- "version": "2.47.1",
3
+ "version": "2.47.2",
4
4
  "description": "A collection of build / support tools for Leverege developers",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -131,7 +131,7 @@ const chart = helmChart?.yaml['Chart.yaml']
131
131
  const values = helmChart?.yaml['values.yaml']
132
132
  const expectedChartRegistry = `${artifactRegistry}/images`
133
133
 
134
- if ( expectedChartRegistry !== values.image.registry ) {
134
+ if ( expectedChartRegistry !== values.image?.registry ) {
135
135
  log( `
136
136
  ${chalk.red.bold( '***Error: mismatched package.json registry and helm/values.yaml' )}
137
137
 
@@ -142,12 +142,23 @@ if ( expectedChartRegistry !== values.image.registry ) {
142
142
 
143
143
  Current settings:
144
144
  package.json registry => ${chalk.yellow.bold( artifactRegistry )}
145
- values.yaml registry => ${chalk.red.bold( values.image.registry )}
145
+ values.yaml registry => ${chalk.red.bold( values.image?.registry )}
146
146
 
147
147
  Expected settings:
148
148
  values.yaml registry => ${chalk.green.bold( expectedChartRegistry )}
149
149
  ` )
150
150
 
151
+ if ( !values.image ) {
152
+ log( `
153
+ ${chalk.yellow.bold( '***DEPRECATED: legacy helm charts detected' )}
154
+
155
+ The helm chart structure appears to be based on the pre-ignition helm chart
156
+ layouts. The charts must be upgraded before docker-to-registry can complete
157
+ its job.
158
+
159
+ ` )
160
+ }
161
+
151
162
  process.exit( 1 )
152
163
  }
153
164
 
package/src/k8cryo.sh CHANGED
@@ -2,6 +2,10 @@
2
2
  #
3
3
  . `build-tools --bashfun`
4
4
 
5
+ daysToKeep=${1:-60}
6
+ let hoursToKeep="$daysToKeep*24"
7
+ printf "\ncryo backup set to keep for $daysToKeep days / $hoursToKeep hours\n"
8
+
5
9
  if [ "`basename $0`" == "k8thaw" ];
6
10
  then
7
11
  errorExit "k8thaw - UNDER CONSTRUCTION"
@@ -11,5 +15,6 @@ fi
11
15
  # generating the Date Time Stamp for scheduled backups.
12
16
  DTS="`date -u +\"%Y%m%d%H%M%S\"`"
13
17
 
14
- # The 1440h specifies the number of hours to keep the backup - 60 days
15
- velero backup create velero-cryo-$DTS --ttl 1440h
18
+ printf "\nExecuting = > velero backup create velero-cryo-$DTS --ttl ${hoursToKeep}h\n"
19
+
20
+ velero backup create velero-cryo-$DTS --ttl ${hoursToKeep}h