@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 +1 -1
- package/src/docker-to-registry.mjs +13 -2
- package/src/k8cryo.sh +7 -2
package/package.json
CHANGED
|
@@ -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
|
|
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
|
|
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
|
-
|
|
15
|
-
|
|
18
|
+
printf "\nExecuting = > velero backup create velero-cryo-$DTS --ttl ${hoursToKeep}h\n"
|
|
19
|
+
|
|
20
|
+
velero backup create velero-cryo-$DTS --ttl ${hoursToKeep}h
|