@@ -299,19 +299,22 @@ interface ReleaseValues {
299299 * `--set` flags pinning the app, realtime, and migrations images. A checkout's chart carries a
300300 * deliberately stale appVersion, so without them the release would run old images. A digest or
301301 * tag the existing release already pins is kept (a digest overrides any tag in the chart).
302- * `latest` is pulled on every start, or nodes would keep the image they cached and never see a
303- * newer build.
302+ * An unpinned realtime or migrations image follows the app's pinned tag, so the three stay on one
303+ * release. `latest` is pulled on every start, or nodes would keep the image they cached and never
304+ * see a newer build. Tags go through `--set-string` so a numeric-looking tag stays a string.
304305 */
305306export function imageTagArgs ( values : ReleaseValues | null ) : string [ ] {
307+ const appTag = values ?. app ?. image ?. tag
308+ const releaseTag = appTag && appTag !== 'latest' ? appTag : 'latest'
306309 return ( [ 'app' , 'realtime' , 'migrations' ] as const ) . flatMap ( ( component ) => {
307310 const image = values ?. [ component ] ?. image
308311 if ( image ?. digest ) {
309- const args = [ '--set' , `${ component } .image.digest=${ image . digest } ` ]
310- return image . tag ? [ ...args , '--set' , `${ component } .image.tag=${ image . tag } ` ] : args
312+ const args = [ '--set-string ' , `${ component } .image.digest=${ image . digest } ` ]
313+ return image . tag ? [ ...args , '--set-string ' , `${ component } .image.tag=${ image . tag } ` ] : args
311314 }
312315 const pinned = image ?. tag
313- const tag = pinned && pinned !== 'latest' ? pinned : 'latest'
314- const args = [ '--set' , `${ component } .image.tag=${ tag } ` ]
316+ const tag = pinned && pinned !== 'latest' ? pinned : releaseTag
317+ const args = [ '--set-string ' , `${ component } .image.tag=${ tag } ` ]
315318 return tag === 'latest' ? [ ...args , '--set' , `${ component } .image.pullPolicy=Always` ] : args
316319 } )
317320}
0 commit comments