-
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
feat(podman): use labels to specify JMX port and optionally host #1514
Merged
andrewazores
merged 4 commits into
cryostatio:main
from
andrewazores:podman-label-discovery
Jun 2, 2023
Merged
feat(podman): use labels to specify JMX port and optionally host #1514
andrewazores
merged 4 commits into
cryostatio:main
from
andrewazores:podman-label-discovery
Jun 2, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
dependent
needs-triage
Needs thorough attention from code reviewers
labels
Jun 1, 2023
andrewazores
added
feat
New feature or request
and removed
needs-triage
Needs thorough attention from code reviewers
labels
Jun 1, 2023
andrewazores
force-pushed
the
podman-label-discovery
branch
from
June 2, 2023 14:02
fb25cf2
to
8e835ad
Compare
This PR/issue depends on:
|
Test image available:
|
andrewazores
force-pushed
the
podman-label-discovery
branch
from
June 2, 2023 15:07
e28b24b
to
a6da5a7
Compare
Test image available:
|
tthvo
reviewed
Jun 2, 2023
tthvo
reviewed
Jun 2, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! I just have a question about libpod uri above.
tthvo
previously approved these changes
Jun 2, 2023
Oh, weird. Not sure why my commits aren't signed. Let me try again. |
andrewazores
force-pushed
the
podman-label-discovery
branch
2 times, most recently
from
June 2, 2023 21:55
3b2dc22
to
1bd08b4
Compare
if hostname is not specified by label then use Podman lookup to determine hostname for container
andrewazores
force-pushed
the
podman-label-discovery
branch
from
June 2, 2023 21:55
1bd08b4
to
28a1513
Compare
tthvo
approved these changes
Jun 2, 2023
Test image available:
|
This was referenced Jun 7, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Welcome to Cryostat! 👋
Before contributing, make sure you have:
main
branch[chore, ci, docs, feat, fix, test]
git commit --amend --signoff
Fixes: #1513
Depends on #1511
Related to #1503
Related to #1394
Description of the change:
This updates the
PodmanPlatformClient
to discover target JMX URLs as follows:io.cryostat.discovery
label, then:io.cryostat.jmxUrl
label. If it is present, use that. Else continue:io.cryostat.jmxPort
label. If it is present, use this to construct the JMX URL.io.cryostat.jmxHost
label. If it is not present, default to retrieving the container's hostname from the Podman API. Use this with thejmxPort
above to construct the JMX URL.Since there are now two main routes (
jmxUrl
, which replaces the previousconnectUrl
, orjmxHost
+jmxPort
), and the Podman HTTP API does not support querying for containers that have any of a list of labels applied, there is a new required label:io.cryostat.discovery
. This label may have any value. This is the label that Cryostat now queries for against the Podman HTTP API to discover containers.Motivation for the change:
As described in #1513, this allows for Podman Discovery to be more flexible and support cases where the container hostname is not known statically when the target application container is started.
How to manually test:
--label
s insmoketest.sh
orrun.sh
according to the description above and ensure they are still picked up after a restart.