]
Sebastian Laskawiec commented on JGRP-2502:
-------------------------------------------
{quote}
I can open there. (
)
About the warning message, I am ok with it,m since this message is printed only once on
the logs, not every X seconds as it is happening today.
{quote}
Thank you! That makes perfect sense.
{quote}
And would be very great was well to provide a way to disable clustering configuration,
most of the time we just scale up standalone apps that does not need to have this feature
enabled. the way it is done today, I didn't find a way to totally disable clustering.
{quote}
Doing this by misconfiguring an application is not the right way. Depending on the
application you're running, there needs to be an option to disable clustering and run
it in standalone mode. Please refer to the project/product manual how to do that. If
that's RHSSO/Keycloak, please contact me by email and I should be able to help you.
If the KUBERNETES_NAMESPACE is not set the default value is the
"default" namespace
------------------------------------------------------------------------------------
Key: JGRP-2502
URL:
https://issues.redhat.com/browse/JGRP-2502
Project: JGroups
Issue Type: Bug
Affects Versions: 5.0.4
Reporter: Filippe Spolti
Assignee: Bela Ban
Priority: Minor
If no namespace is set it defaults to the "default" ocp namespace which will
case the warn as described in the log message below:
{code:java}
WARN [org.jgroups.protocols.kubernetes.KUBE_PING] (thread-9,ee,hdm78-kieserver-1-nggcf)
failed getting JSON response from Kubernetes
Client[masterUrl=https://172.30.0.1:443/api/v1, headers={Authorization=#MASKED:937#},
connectTimeout=5000, readTimeout=30000, operationAttempts=3, operationSleep=1000,
streamProvider=org.jgroups.protocols.kubernetes.stream.TokenStreamProvider@69991c01] for
cluster [ee], namespace [default], labels [null]; encountered [java.lang.Exception: 3
attempt(s) with a 1000ms sleep to execute [OpenStream] failed. Last failure was
[java.io.IOException: Server returned HTTP response code: 403 for URL:
https://172.30.0.1:443/api/v1/namespaces/default/pods]]
{code}
IMHO the default namespace should not be used in this case since this namespace should
not be used to deploy applications.
If the namespace is not set it means that we do not want to enable the clustering
feature, as the namespace is set if the namespace is not set, this condition [1] is not
satisfied and the configuration will proceed.
Another problem found in the tests is that, if we do set the KUBERNETES_NAMESPACE with no
value, it will detect that the env has an value and will try to use a blank namespace:
{code:java}
failed getting JSON response from Kubernetes
Client[masterUrl=https://172.30.0.1:443/api/v1 , headers={Authorization=#MASKED:874#},
connectTimeout=5000, readTimeout=30000, operationAttempts=3, operationSleep=1000,
streamProvider=org.jgroups.protocols.kubernetes.stream.TokenStreamProvider@17978314] for
cluster [ee], namespace [], labels [null]; encountered [java.lang.Exception: 3 attempt(s)
with a 1000ms sleep to execute [OpenStream] failed. Last failure was [java.io.IOException:
Server returned HTTP response code: 403 for URL:
https://172.30.0.1:443/api/v1/pods ]]
{code}
[1]
- https://github.com/jgroups-extras/jgroups-kubernetes/blob/master/src/main/java/org/jgroups/protocols/kubernetes/KUBE_PING.java#L145