Skip to content

Commit a24270f

Browse files
committed
Fix #31334: add version property to shinyproxy pods
1 parent a7d81c2 commit a24270f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/main/kotlin/eu/openanalytics/shinyproxyoperator/components/PodTemplateSpecFactory.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ class PodTemplateSpecFactory {
3333

3434
val operator = Operator.getOperatorInstance()
3535

36+
val version = if (shinyProxyInstance.hashOfSpec == shinyProxy.hashOfCurrentSpec) {
37+
System.currentTimeMillis()
38+
} else {
39+
0
40+
}
41+
3642
//@formatter:off
3743
val template = PodTemplateSpecBuilder()
3844
.withNewMetadata()
@@ -75,6 +81,10 @@ class PodTemplateSpecFactory {
7581
EnvVarBuilder()
7682
.withName("PROXY_REALM_ID")
7783
.withValue(shinyProxy.realmId)
84+
.build(),
85+
EnvVarBuilder()
86+
.withName("PROXY_VERSION")
87+
.withValue(version.toString())
7888
.build()))
7989
.withVolumeMounts(VolumeMountBuilder()
8090
.withName("config-volume")

0 commit comments

Comments
 (0)