You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/kotlin/eu/openanalytics/shinyproxyoperator/controller/ShinyProxyController.kt
+2-5Lines changed: 2 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -135,7 +135,7 @@ class ShinyProxyController(private val channel: Channel<ShinyProxyEvent>,
135
135
val revision =if (existingInstance !=null) {
136
136
logger.info { "${shinyProxy.logPrefix(existingInstance)} Trying to create new instance which already exists and is not the latest instance. Therefore this instance will become the latest again" }
137
137
// reconcile will take care of making this the latest instance again
138
-
existingInstance.revision +1
138
+
(existingInstance.revision?:0)+1
139
139
} else {
140
140
0
141
141
}
@@ -286,7 +286,7 @@ class ShinyProxyController(private val channel: Channel<ShinyProxyEvent>,
286
286
val instancesToCheck = shinyProxy.status.instances.toList()
287
287
for (shinyProxyInstance in instancesToCheck) {
288
288
val latestRevision = shinyProxy.status.getInstanceByHash(shinyProxyInstance.hashOfSpec)?.revision ?:0
for (service in resourceRetriever.getServiceByLabels(LabelFactory.labelsForShinyProxyInstance(shinyProxy, shinyProxyInstance), shinyProxy.metadata.namespace)) {
325
-
kubernetesClient.resource(service).delete()
326
-
}
327
324
for (replicaSet in resourceRetriever.getReplicaSetByLabels(LabelFactory.labelsForShinyProxyInstance(shinyProxy, shinyProxyInstance), shinyProxy.metadata.namespace)) {
0 commit comments