-
Notifications
You must be signed in to change notification settings - Fork 898
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
Auto-tagging from kubernetes/openshift labels #7460
Comments
miq-bot add_label providers/containers, enhancement, question |
@miq-bot add_label providers/containers, enhancement, question |
See also a related discussion / argument, which will probably be relevant, here: http://talk.manageiq.org/t/aws-tag-synchronization/291/6 |
@cben generally it's done through the UI (in the region settings: Configuration => Settings => Region ...). You can also import new tags.
@cben in the end the user will configure the mapping in the UI but I think you should concentrate on the backend first. I think we said that we would have created the tags based on the labels name and value, and I believe there is something similar already for VMs, e.g. tags as Check this code. |
Thanks, these are helpful.
Hmm. Your stance there was that we should not auto-tag, that if really desired by a customer it should be done in Automate, and that we should rather make improve ability to use custom_attributes directly. |
Oh, I see. Clicking the top-level "CFME Region: Region 0 [0]" in the outline on the left shows tabs with settings whose existance can't be guessed from the outline. Not the best UX imho. |
According to @blomquisg, @gmcculloug could help you here @cben. @gmcculloug is my comment correct about dynamic creation of tags? |
Threw current code at #7605. |
Backend got merged. (Some small tasks remain there.) We are now missing the frontend to deliver a complete solution. Central UX question: should user have to create tag/category [at Settings->Configuration->Region 0->My Company Tags] and then create a mapping [at some other place TBD], |
@cben let's start simple and give the ability to pick from the already existing tags. |
@miq-bot assign cben |
@miq-bot remove_label question |
Currently I believe it doesn't happen — I'm directly adding to |
Discovered in docs: => Company tags which you will see under My Company Tags for a resource. Create company tags by navigating to Settings → Configuration, then clicking on the Settings, then selecting Region, then the My Company Tags tab. A selection of company tags is provided to you by default as samples. These can be deleted if you do not need them, but are not recreated by CloudForms Management Engine. => System tags are assigned automatically by CloudForms Management Engine. If this is a real concept, sounds like I want the tags I assign to show up as "System tags". |
ManageIQ doesn't cope well with tons of tags due to session object size: #10074 |
We discussed yesterday multiple problems with the design. Will open separate issues but for now an overview:
|
Where can one use auto-tagged read_only tags:
EXTRACTED TO #15861 |
|
EXTRACTED TO: ManageIQ/manageiq-ui-classic#2840 Dumping my paper notes on UX loose ends (cc @zgalor):
|
@cben these are easy right? Just labels...
@cben how hard is this to fix? |
Yeah, first few ones are low-hanging tweaks. I hoped to already have some PRs but never found the time...
This one is a bit harder. UI supports "map 2 types to different categories" by naming the categories |
This issue has been automatically marked as stale because it has not been updated for at least 6 months. If you can still reproduce this issue on the current release or on Thank you for all your contributions! |
@cben Is this already implemented, and if so can this be closed? |
Yeah, long implemented and on 2nd or 3rd rewrite now :-) Closing, extracting todos I kept here to other issues. |
Basic goal: since containers and related entities come and go quickly, manual tagging is futile (but it works). We want to automatically create tags based on existing kubernetes/openshift labels. All labels generating tags might be too much noise, so we probably want a "policy" by which one can define desired label->tag mapping.
UPDATE
Originally implemented in #7605; multiple bugs fixed, especially by big rewrite #11806; UI added by Zohar in #11591. See #11591 for screenshots.
Documentation BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1389129
I'm keeping this issue for the whole feature to track loose ends, untested corners, bugs.
There is also ongoing work to support direct use of labels in MiqExpression & reports (without mapping them to tags) - https://bugzilla.redhat.com/show_bug.cgi?id=1382720...
I've come to appreciate the wisdom of @Fryguy's comments that this is what we should have done from the beginning. Unfortunately there are corners — especially chargeback reports — that can't easily benefit from it, while tags are already supported, so we still need mapping to tags.
I was hoping to a proof-of-concept PR by now, but all I have is some understanding and questions.
@simon3z please cc whoever relevant.
Notes to self: What I learned about labels & tags
Labels are key=value pairs. Keys have
example.com/foo
form when system-assigned (eg.kubernetes.io/hostname
); custom labels may use unprefixedfoo
form. Values have some constraints but are basically unstructured.We store labels under
custom_attributes
polymorphic table wheresection="labels"
. (Other sections we have are "selectors" and "node_selectors". Don't think I care about those, although conceptually they represent label-dependent object sets.)See https://gist.github.com/cben/2619583f777ddb480a10#file-labels-txt for examples.
Possible tags are defined via
classifications
andtags
tables.They are applied to objects through polymorphic
taggings
table. Many many types sayacts_as_miq_taggable
which gives them.taggings
, the higher-level.tags
shortcut and a bunch ofActsAsTaggable
methods.Tag and Classification live in a bewildering, mostly 1:1 symbiosis. Their models have a ton of methods, calling each other. => Apparently the higher-level concept is tags.
Tag
names are organized hierarchically in "/namespace/category/name" structure. namespace is normally/managed
.See https://gist.github.com/cben/2619583f777ddb480a10#file-tags-txt for examples.
Classification
stores metadata on a tag or category (hierarchy viaparent_id
), including human description.See https://gist.github.com/cben/2619583f777ddb480a10#file-classification-txt for examples.
There is some code supporting
/virtual/...
tags, not sure if it's used.Basic questions
Tag space pollution
Labels are key,value with an open-ended set of values; for tags we pre-configure all possible values.
This implies we'll need to auto-define tags for newly encountered values, which over time will pollute the Classification & Tag tables...
It's not obvious to me how to garbage-collect unused auto-defined tags.
In any case, they should probably live in a different namespace from
/managed
.Materialize tags vs virtual view?
taggings
. It could be a model or a UI logic directly quering the labels. That might be more work(?) or less efficient but has consistency benefits.The text was updated successfully, but these errors were encountered: