-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
[WIP] add cdx:k8s
taxonomy
#61
base: main
Are you sure you want to change the base?
Conversation
Would you mind signing-off your commit, to show that you agree to publishing your contribution under the license of this very project? |
Signed-off-by: Itay Shakury <[email protected]>
Signed-off-by: Itay Shakury <[email protected]>
After some further discussion and feedback, I have slightly modified the PR:
based on this I would also remove the link from the field descriptions and keep it only as a general reference at the namespace description, if you think it makes sense |
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.
latest change make it hard to read what wand how things are about to be structured.
if you must distinguish between component's runner's type: structure things in a hierarchical way:
cdx:k8s:control-panel:component:role
- link to https://kubernetes.io/docs/concepts/overview/components/#control-plane-components
- well-knwon: kube-apiserver, etcd ...
cdx:k8s:node:component:role
- link to https://kubernetes.io/docs/concepts/overview/components/#node-components
- well-known: kubelet, ...
cdx:k8s:addons:component:role
- link to https://kubernetes.io/docs/concepts/overview/components/#addons
- well-known: ...
but at the moment i do not see any need for it, see #61 (comment)
| `cdx:k8s:component:role` | Role of the [Kubernetes component](https://kubernetes.io/docs/concepts/overview/components/). | | ||
| Property | Description | | ||
| --- | --- | | ||
| `cdx:k8s:component:type` | Type of the [Kubernetes component](https://kubernetes.io/docs/concepts/overview/components/). Well-known roles are "controlPlane", "node" | |
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.
to my understanding, "controlPlane" and "node" are not types of a component, but workers that are defined as such are able to run specific components.
why do you need to make this clear in the first place?
if i knew a components role (like "kubelet") i would know on which runner-type this should be running (like "node").
there is no need to announce directly implied data, right?
could you describe why this information is useful?
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.
the use of this field is just for information management, so that a user can search the control plane components or ignore them, etc. yes we don't mind removing it in the initial PR.
about your comment: for node-level components I think you're right and in fact we represent this as a dependency in the SBOM we generate. for control plane, there isn't an entity to refer to, we actually has a version with a controlplan entiry in the sbom just for the hierarchy but eventually decided to use property instead.
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.
I agree with @itaysk in that there is value in stating the component type explicitly. If the tool generating the KBOM is able to deduce the type, why should the receiving party have to do it again?
The distinction of control plane vs. node is most certainly something the receiving party is interested in.
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.
The distinction of control plane vs. node is most certainly something the receiving party is interested in.
@nscuro Is there an improvement you want to suggest?
| Property | Description | | ||
| --- | --- | | ||
| `cdx:k8s:component:type` | Type of the [Kubernetes component](https://kubernetes.io/docs/concepts/overview/components/). Well-known roles are "controlPlane", "node" | | ||
| `cdx:k8s:component:name` | Name of the [Kubernetes component](https://kubernetes.io/docs/concepts/overview/components/). Well-known names are "kube-apiserver", "kube-scheduler", kube-controller-manager", "cloud-controller-manager", "kubelet", "kube-proxy", "dashboard", "cni", "csi" | |
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.
you mentioned that the names are not the official ones but different.
The official ones do have documentation and I would recognize them. Your custom values have no documentation at all.
what is the benefit in custom values?
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.
Sorry for the long comment.
I think this document does not intend to be the source of truth for how to classify or name components and it's not comprehensive nor up to date. Also, it is written as an article and not a technical document and therefore I don't think the titles used there should be taken verbatim as canonical names. For example:
- some of the components like
kube-apiserver
orcloud-controller-manager
are written in a technical standard, while some likeWeb UI (Dashboard)
orContainer Resource Monitoring
are written in a human readable standard. Also some titles like "Logging" or "Monitoring" aren't grammatically fitting for a component role or type. I think offering the latter as well known is inconsistent and potentially confusing. - "Network Plugins" is a good for a doc title in but the technical term generally used is CNI Plugin (container network interface). This is used in other parts of the k8s docs and in other k8s tools. The doc covers CNI but not CSI (container storage interface) which is a more recent addition. If we chose the doc title "Network Plugin" should we call the other one "Storage Plugin" to go with the theme? probably not.
Web UI (dashboard)
- again, decent title in an web page, but I don't think it's useful in a json document.- Addons is an entire rabbit hole of inconsistency and ill defined concepts. Addons used to be a k8s feature (there was an "addon-manager" and a collection of addons) but this is no longer. Now addon is an abstract concept which has conflicting definitions: the k8s docs refer to addons as k8s components in kube-system namespace, but the addons listed in the same don't follow this definition. most kubernetes utilities today (that could have been "addons") are being distributed and installed by users however they want and aren't called addons anymore. so for us, we decided against trying to fix this problem and just ignore it.
IMO - besides the "very well known" components (apiserver, kubelet, etc) I think it will be very hard to map components to a common taxonomy (for example, is this app I found a k8s dashboard or just an admin tool you happen to have there) and it's also not a problem we're trying to solve right now.
I can restore my original version with the titles from doc, or keep just the "very well known" components, up to you.
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.
Agreed, the naming scheme used by the linked document is inconsistent and there exist better, technical names that are widely used in the industry.
For cni
and csi
specifically though, I'd suggest to use cni-plugin
and csi-plugin
instead. CNI and CSI are just interfaces exposed by k8s, whereas what you'd list in a KBOM are implementations of it (e.g. Calico, Cilium).
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.
so we really need a set of well-known values in the documentation, right?
Would you add one, so we can discuss it?
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.
Agreed, the naming scheme used by the linked document is inconsistent and there exist better, technical names that are widely used in the industry.
Why is this? I mean, we are scoping for Kubernetes, right?
How comes the terms from the docs of Kubernetes are inconsistent, and why are there technical names that are widely used in the industry instead?
Could somebody explain and help me understand, whether we are still in the technical scope of Kubernetes, not in general container scope?
@nscuro may I ask for your opinion on this PR? |
@jkowalleck Just wanted to ping you that I saw your request and I have it on my list, just didn't have time yet to dig into this. Will provide some feedback this weekend. |
KSOK also has an Kubernetes taxonomy: https://github.com/ksoclabs/kbom/blob/main/docs/taxonomy.md |
@itaysk how is the status on this pull request, from your perspective? |
Add
cdx:k8s
taxonomy. Motivation has been discussed in #59.Comments:
role
might be confused with "RBAC Role" in k8s context.2.1 "type"/"kind" are ambiguous especially in this context.
2.2
cdx:components:component
is semantically most accurate but possibly less readable2.3 Overall I think role is fine, but happy feedback welcome.
k8s
is commonly used (by the kubernetes community) to abbreviateKubernetes
, especially in use cases like this. LMK if you preferkubernetes
instead.Close: #59