Skip to content

Commit ef7cc8a

Browse files
committed
Small fixes
1 parent 520681f commit ef7cc8a

5 files changed

Lines changed: 4 additions & 56 deletions

File tree

src/main/java/eu/openanalytics/containerproxy/backend/dispatcher/proxysharing/DelegateProxyKey.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public class DelegateProxyKey extends RuntimeValueKey<Boolean> {
2828

2929
private DelegateProxyKey() {
3030
super("openanalytics.eu/sp-delegate-proxy",
31-
"SHINYPROXY_DELEGATE_PROXYS",
31+
"SHINYPROXY_DELEGATE_PROXY",
3232
true,
3333
false,
3434
false,

src/main/java/eu/openanalytics/containerproxy/backend/kubernetes/KubernetesBackend.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ public Proxy startContainer(Authentication user, Container initialContainer, Con
325325

326326

327327
Pod startupPod = podBuilder.withSpec(podSpec).build();
328-
Pod patchedPod = applyPodPatches(user, proxySpec, specExtension, proxy, startupPod);
328+
Pod patchedPod = applyPodPatches(user, proxySpec, specExtension, proxy, startupPod, initialContainer);
329329
final String effectiveKubeNamespace = patchedPod.getMetadata().getNamespace(); // use the namespace of the patched Pod, in case the patch changes the namespace.
330330
// set the BackendContainerName now, so that the pod can be deleted in case other steps of this function fails
331331
rContainerBuilder.addRuntimeValue(new RuntimeValue(BackendContainerNameKey.inst, effectiveKubeNamespace + "/" + patchedPod.getMetadata().getName()), false);
@@ -404,11 +404,11 @@ public Proxy startContainer(Authentication user, Container initialContainer, Con
404404
}
405405
}
406406

407-
private Pod applyPodPatches(Authentication auth, ProxySpec proxySpec, KubernetesSpecExtension specExtension, Proxy proxy, Pod startupPod) throws JsonProcessingException {
407+
private Pod applyPodPatches(Authentication auth, ProxySpec proxySpec, KubernetesSpecExtension specExtension, Proxy proxy, Pod startupPod, Container container) throws JsonProcessingException {
408408
Pod patchedPod = podPatcher.patchWithDebug(proxy, startupPod, readPatchFromSpec(specExtension.kubernetesPodPatches));
409409

410410
for (AuthorizedPodPatches authorizedPodPatches : specExtension.kubernetesAuthorizedPodPatches) {
411-
if (accessControlEvaluationService.checkAccess(auth, proxySpec, authorizedPodPatches.accessControl)) {
411+
if (accessControlEvaluationService.checkAccess(auth, proxySpec, authorizedPodPatches.accessControl, proxy, container)) {
412412
patchedPod = podPatcher.patchWithDebug(proxy, patchedPod, readPatchFromSpec(authorizedPodPatches.patches));
413413
}
414414
}

src/main/java/eu/openanalytics/containerproxy/model/runtime/runtimevalues/RuntimeValueKeyRegistry.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ public class RuntimeValueKeyRegistry {
5252
addRuntimeValueKey(PublicPathKey.inst);
5353
addRuntimeValueKey(HttpHeadersKey.inst);
5454
addRuntimeValueKey(TargetIdKey.inst);
55-
addRuntimeValueKey(TaskDefinitionKey.inst);
5655
addRuntimeValueKey(CacheHeadersModeKey.inst);
5756
}
5857

src/main/java/eu/openanalytics/containerproxy/model/runtime/runtimevalues/TaskDefinitionKey.java

Lines changed: 0 additions & 49 deletions
This file was deleted.

src/main/java/eu/openanalytics/containerproxy/model/spec/ProxySpec.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,6 @@ public ProxySpec firstResolve(SpecExpressionResolver resolver, SpecExpressionCon
127127
return toBuilder()
128128
.heartbeatTimeout(heartbeatTimeout.resolve(resolver, context))
129129
.maxLifeTime(maxLifeTime.resolve(resolver, context))
130-
.maxTotalInstances(maxTotalInstances)
131130
.specExtensions(
132131
specExtensions.entrySet()
133132
.stream()
@@ -140,7 +139,6 @@ public ProxySpec firstResolve(SpecExpressionResolver resolver, SpecExpressionCon
140139
.map(c -> c.firstResolve(resolver, context.copy(c)))
141140
.toList()
142141
)
143-
.cacheHeadersMode(cacheHeadersMode)
144142
.build();
145143
}
146144

0 commit comments

Comments
 (0)