Skip to content

Commit

Permalink
Fix #30945: add nginx.org/websocket-services
Browse files Browse the repository at this point in the history
  • Loading branch information
LEDfan committed Feb 26, 2024
1 parent 386bca2 commit 652c1b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class IngressFactory(private val kubeClient: KubernetesClient) {
.withNewMetadata()
.withName(ResourceNameFactory.createNameForIngress(shinyProxy))
.withLabels<String, String>(labels)
.withAnnotations<String, String>(mapOf("nginx.org/websocket-services" to ResourceNameFactory.createNameForService(shinyProxy)))
.addNewOwnerReference()
.withController(true)
.withKind("ShinyProxy")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ class ShinyProxyTestInstance(private val namespace: String,
LabelFactory.LATEST_INSTANCE_LABEL to sp.status.latestInstance()!!.hashOfSpec
), ingress.metadata.labels)

assertEquals(mapOf(
"nginx.org/websocket-services" to "sp-${sp.metadata.name}-svc".take(63),
),
ingress.metadata.annotations
)

assertOwnerReferenceIsCorrect(ingress, sp)

assertEquals(1, ingress.spec.rules.size)
Expand Down

0 comments on commit 652c1b6

Please sign in to comment.