Skip to content
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

8237: Add support for Jolokia over Kubernetes proxy #576

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

skarsaune
Copy link
Contributor

@skarsaune skarsaune commented Aug 4, 2024

JMC-8273 : Use the jolokia protocol over a kubernetes http proxy.

Testing connectivity:

  • Docker desktop kubernetes
  • Azure AKS
  • Amazon EKS
  • Google GKE

Other things observed:

  • * Option to install agent should be disabled (debug difference with jolokia) - see below*
  • * Warning: NLS missing message: JmcKubernetesPreferenceForm_LogErrorsTooltip in: org.openjdk.jmc.kubernetes.preferences.messages
  • * SLF4J(W): No SLF4J providers were found. OK for now, can investigate more later
    SLF4J(W): Defaulting to no-operation (NOP) logger implementation
    SLF4J(W): See https://www.slf4j.org/codes.html#noProviders for further details.
  • Unlocking secrets now appear on startup. Should not be needed unless there are credentials used. (fixed)

Progress

  • Commit message must refer to an issue
  • Change must be properly reviewed (1 review required, with at least 1 Committer)

Issue

  • JMC-8237: Add support for Jolokia over Kubernetes proxy (Enhancement - P4)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jmc.git pull/576/head:pull/576
$ git checkout pull/576

Update a local copy of the PR:
$ git checkout pull/576
$ git pull https://git.openjdk.org/jmc.git pull/576/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 576

View PR using the GUI difftool:
$ git pr show -t 576

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jmc/pull/576.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 4, 2024

👋 Welcome back skarsaune! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Aug 4, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@skarsaune skarsaune changed the title JMC-8237: Connect with Jolokia protocol over kubernetes HTTP proxy JMC-8237: Connect with Jolokia protocol over kubernetes proxy Aug 9, 2024
@skarsaune skarsaune changed the title JMC-8237: Connect with Jolokia protocol over kubernetes proxy JMC-8237: Add support for Jolokia over Kubernetes proxy Aug 9, 2024
@openjdk openjdk bot changed the title JMC-8237: Add support for Jolokia over Kubernetes proxy 8237: Add support for Jolokia over Kubernetes proxy Aug 9, 2024
@thegreystone thegreystone requested a review from aptmac September 25, 2024 17:10
@bridgekeeper
Copy link

bridgekeeper bot commented Sep 29, 2024

@skarsaune This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@skarsaune
Copy link
Contributor Author

The cause for the log initialization output is calling Utils.getSystemPropertyOrEnvVar . That is only used very briefly for that very particular use. Can look for alternatives.

@skarsaune
Copy link
Contributor Author

The cause for the log initialization output is calling Utils.getSystemPropertyOrEnvVar . That is only used very briefly for that very particular use. Can look for alternatives.

However, other fabric8.io methods need slf4j quite immediately after that. As the log statement states, it will default to a NOOP logger that we believe is sufficient at this point (problems scanning contexts will manifest themselves as exceptions that should be sufficient to troubleshoot).

@skarsaune
Copy link
Contributor Author

Found the "issue" with the JMC agent.

public boolean isLocalJvm() { return connectionHandle.getServerDescriptor().getJvmInfo() != null; }
Will experiment with not providing getJvmInfo for jolokia and kubernetes

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 24, 2024

@skarsaune This pull request has been inactive for more than 8 weeks and will be automatically closed if another 8 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@skarsaune
Copy link
Contributor Author

Finding on the Jolokia side. When probing connection k8s API authorization is missing. This can be fixed by using fabric8 http client instead of using OK Http directly.

@openjdk
Copy link

openjdk bot commented Jan 3, 2025

@skarsaune this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout JMC-8237-kubernetes-proxy
git fetch https://git.openjdk.org/jmc.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@skarsaune
Copy link
Contributor Author

Have been able to fix kubernetes client in Jolokia, however basic auth for jolokia with special header fails.

@openjdk openjdk bot removed the merge-conflict label Jan 7, 2025
@openjdk openjdk bot removed the merge-conflict label Feb 16, 2025
@skarsaune skarsaune marked this pull request as ready for review February 16, 2025 22:22
@openjdk openjdk bot added the rfr label Feb 16, 2025
@mlbridge
Copy link

mlbridge bot commented Feb 16, 2025

Webrevs

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 16, 2025

@skarsaune This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@skarsaune
Copy link
Contributor Author

@aptmac : At long last the pieces are falling into place here. I will consider upgrading to jolokia 2.2.3 once it is out, but it is already possible to look at it and test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

1 participant