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

Improve Docker Swarm and Compose support #56

Merged
merged 12 commits into from
Jan 14, 2025

Conversation

AlexGustafsson
Copy link
Owner

@AlexGustafsson AlexGustafsson commented Jan 12, 2025

  • Ensure no duplicate tags are created
  • Add Kubernetes namespaces as tags
  • Improve support for Docker Swarm and Docker Compose
    • Identify tags even when Docker Swarm uses a digest image
    • Graph Docker Swarm and Compose tasks, services and namespaces
    • Add Docker Swarm namespaces and Docker Compose projects as a tag

Screenshot of graph in Docker Swarm:

image

Screenshot of image with namespace tag in Docker:

image

Screenshot of image with namespace tag in Kubernetes:

image

@AlexGustafsson
Copy link
Owner Author

AlexGustafsson commented Jan 12, 2025

Since these tags are user-defined, I'm thinking that perhaps we should namespace them.

Ideas:

  • namespace:monitoring
  • n:monitoring
image

@AlexGustafsson
Copy link
Owner Author

AlexGustafsson commented Jan 12, 2025

Using tags for this makes it possible for there being any number of tags, so we need to rework the dropdown a bit to be able to scroll:

image

Idea: sort the tags in the dropdown based on prefix. First, prioritize all non-prefixed tags (not containing a ":"), then sort alphabetically.

@AlexGustafsson
Copy link
Owner Author

I've made the tag select dropdown scrollable and sorted the namespaced tags last.

image

@AlexGustafsson AlexGustafsson force-pushed the dev/namespace-stack-tags branch 4 times, most recently from e2bce19 to cc695fe Compare January 12, 2025 18:12
@AlexGustafsson AlexGustafsson changed the title Improve Docker Swarm support Improve Docker Swarm and Desktop support Jan 13, 2025
@AlexGustafsson AlexGustafsson changed the title Improve Docker Swarm and Desktop support Improve Docker Swarm and Compose support Jan 13, 2025
@AlexGustafsson AlexGustafsson force-pushed the dev/namespace-stack-tags branch 2 times, most recently from 66f9574 to 55f1e4b Compare January 13, 2025 14:56
- Identify tags even when Docker Swarm uses a digest image
- Graph Docker Swarm tasks, services and namespaces
- Add Docker Swarm namespace as a tag
With namespaces tags added, the list of tags can be quite long. Make the
order deterministic and prioritize the built-in tags. Place prefixed
tags such as "namespace:monitoring" at the end of the list.
Make sure that the tag select will scroll if there are many tags
available.
Nested anchor tags (as used by the badges of the image card) are not
legal. As we still want the image card to be a proper anchor, let's try
our best to simulate anchors for the badges.

This is not by any means a perfect solution, but will suffice for most
cases.
@AlexGustafsson AlexGustafsson force-pushed the dev/namespace-stack-tags branch from 55f1e4b to d171aeb Compare January 14, 2025 15:39
@AlexGustafsson AlexGustafsson merged commit d171aeb into main Jan 14, 2025
5 checks passed
@AlexGustafsson AlexGustafsson deleted the dev/namespace-stack-tags branch January 14, 2025 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant