-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(k8s): Endpoints discovery port names/numbers are configurable #1862
fix(k8s): Endpoints discovery port names/numbers are configurable #1862
Conversation
Hi @andrewazores! Add at least one of the required labels to this PR Required labels are : chore,ci,cleanup,docs,feat,fix,perf,refactor,style,test |
/build_test |
Workflow started at 1/23/2024, 2:09:59 PM. View Actions Run. |
To run smoketest:
|
|
src/main/java/io/cryostat/platform/internal/KubeApiPlatformStrategy.java
Show resolved
Hide resolved
7a60a05
to
8dcca34
Compare
0b93d62
to
b0d98e9
Compare
/build_test |
Workflow started at 2/6/2024, 12:21:03 PM. View Actions Run. |
b0d98e9
to
66251f7
Compare
/build_test |
Workflow started at 2/6/2024, 12:44:21 PM. View Actions Run. |
To run smoketest:
|
|
This reverts commit 9d47322.
691a9bd
to
62c38c4
Compare
) (cherry picked from commit 838affd)
) (#1874) (cherry picked from commit 838affd) Co-authored-by: Andrew Azores <[email protected]>
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
To recreate commits with GPG signature
git fetch upstream && git rebase --force --gpg-sign upstream/main
Fixes: #1861
Description of the change:
Adds environment variables for customizing the behaviour of the builtin k8s Endpoints discovery mechanism. Rather than always looking for ports named
jfr-jmx
or numbered9091
, this allows the deploying user to specify a list of acceptable names and a list of acceptable numbers that should be matched, both of them comma-separated. The names list can be set to the empty list by using the value-
, and the number list can be set to the empty list by using the value0
. If these variables are not defined or have empty values then they default to the singleton lists ofjfr-jmx
and9091
respectively, maintaining the previous behaviour.Motivation for the change:
For users deploying Cryostat into scenarios where a port named
jfr-jmx
or numbered9091
already exists for another purpose, this allows Cryostat to be dropped in with only minor configuration so that the Kubernetes Endpoints discovery mechanism can still be used, but does not mistakenly see non-JMX service ports as connectable targets when they really are not.How to manually test:
helm install cryostat --set core.image.repository=quay.io/andrewazores/cryostat --set core.image.tag=2.5.0-k8s-discovery-3 --set pvc.enabled=true --set core.route.enabled=true ./charts/cryostat
make sample_app
to get aquarkus-test
sample applicationoc edit deployment cryostat
to set/editCRYOSTAT_DISCOVERY_K8S_PORT_NAMES
andCRYOSTAT_DISCOVERY_K8S_PORT_NUMBERS
, andoc edit service quarkus-test
to change the port name/number on the sample app.