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/ResourceListener.kt
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -72,10 +72,8 @@ class ResourceListener<T : HasMetadata, L : KubernetesResourceList<T>, R : Resou
72
72
val shinyProxy = shinyProxyLister.namespace(resource.metadata.namespace)[ownerReference.name] ?:return
73
73
if (!isInManagedNamespace(shinyProxy)) return
74
74
val hashOfInstance = resource.metadata.labels[LabelFactory.INSTANCE_LABEL]
75
-
if (hashOfInstance ==null) {
76
-
logger.warn { "[${resource.kind}] [${resource.metadata.namespace}/${resource.metadata.name}] Cannot find hash of instance for this resource - probably the resource is being deleted" }
77
-
return
78
-
}
75
+
?: shinyProxy.status.latestInstance()?.hashOfSpec
76
+
?:return
79
77
80
78
val shinyProxyInstance = shinyProxy.status.getInstanceByHash(hashOfInstance)
val replicaSet = getReplicaSet(resourceRetriever, shinyProxy, latestInstance)
60
55
if (replicaSet ==null) {
61
-
logger.warn { "${shinyProxy.logPrefix(latestInstance)} [Component/Ingress] Cannot reconcile Ingress since it has no ReplicaSet - probably this resource is being deleted" }
56
+
logger.warn { "${shinyProxy.logPrefix(latestInstance)} [Component/Service] Cannot reconcile Service since it has no ReplicaSet - probably this resource is being deleted" }
62
57
return
63
58
}
64
59
if (!Readiness.getInstance().isReady(replicaSet)) {
65
-
logger.warn { "${shinyProxy.logPrefix(latestInstance)} [Component/Ingress] Cannot reconcile Ingress since the corresponding ReplicaSet is not ready yet - it is probably being created" }
60
+
logger.warn { "${shinyProxy.logPrefix(latestInstance)} [Component/Service] Cannot reconcile Service since the corresponding ReplicaSet is not ready yet - it is probably being created" }
66
61
return
67
62
}
68
63
// ReplicaSet exists and is ready -> time to create ingress
69
64
// By only creating the ingress now, we ensure no 502 bad gateways are generated
0 commit comments