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
val shinyProxy =ShinyProxy(shinyProxyCustomResource.spec, shinyProxyCustomResource.metadata.name, shinyProxyCustomResource.metadata.namespace)
124
+
for (resource in lister.list()) {
125
+
val otherShinyproxy =ShinyProxy(resource.spec, resource.metadata.name, resource.metadata.namespace)
126
+
if (shinyProxy.realmId == otherShinyproxy.realmId || shinyProxy.subPath != otherShinyproxy.subPath) {
127
+
continue
128
+
}
129
+
if (shinyProxy.fqdn == otherShinyproxy.fqdn) {
130
+
logger.warn { "Found multiple ShinyProxy resources with the same URL, fqdn: '${shinyProxy.fqdn}', path: '${shinyProxy.subPath}', realm: '${shinyProxy.realmId}' already defined in realm '${otherShinyproxy.realmId}'" }
131
+
returnfalse
132
+
}
133
+
for (additionalFqdn in shinyProxy.additionalFqdns) {
134
+
for (otherAdditionalFqdn in otherShinyproxy.additionalFqdns) {
135
+
if (additionalFqdn == otherAdditionalFqdn) {
136
+
logger.warn { "Found multiple ShinyProxy resources with the same (additional) URL, additional fqdn: '${additionalFqdn}', path: '${shinyProxy.subPath}', realm: '${shinyProxy.realmId}' already defined in realm '${otherShinyproxy.realmId}'" }
val baseUrl =Pair(shinyProxy.fqdn, shinyProxy.subPath)
146
+
if (urlToFile.containsKey(baseUrl)) {
147
+
logger.warn { "Found multiple ShinyProxy resources with the same URL, fqdn: '${shinyProxy.fqdn}', path: '${shinyProxy.subPath}', realm: '${shinyProxy.realmId}' in file: '${fileName}', already defined in '${urlToFile[baseUrl]}'" }
148
+
returnfalse
149
+
}
150
+
urlToFile[baseUrl] = fileName
151
+
for (additionalFqdn in shinyProxy.additionalFqdns) {
152
+
val url =Pair(additionalFqdn, shinyProxy.subPath)
153
+
if (urlToFile.containsKey(url)) {
154
+
logger.warn { "Found multiple ShinyProxy resources with the same (additional) URL, additional fqdn: '${additionalFqdn}', path: '${shinyProxy.subPath}', realm: '${shinyProxy.realmId}' in file: '${fileName}', already defined in '${urlToFile[url]}'" }
0 commit comments