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

add convention attribute for k8s cluster version #2913

Open
frzifus opened this issue Nov 2, 2022 · 2 comments
Open

add convention attribute for k8s cluster version #2913

frzifus opened this issue Nov 2, 2022 · 2 comments
Assignees
Labels
area:semantic-conventions Related to semantic conventions enhancement New feature or request spec:resource Related to the specification/resource directory

Comments

@frzifus
Copy link
Member

frzifus commented Nov 2, 2022

What are you trying to achieve?

It would be nice to support cluster versions. Cluster upgrades can cause problems with software that communicates with this api. But I'am missing a convention entry for k8s cluster version equal to the cluster name (conventions.AttributeK8SClusterName).

What did you expect to see?
An entry like conventions.AttributeK8SClusterVersion = "k8s.cluster.version".

Additional context.

This is related to the OpenShift metadata provider implementation in otelcol-contrib.

@frzifus frzifus added the spec:resource Related to the specification/resource directory label Nov 2, 2022
@arminru arminru added enhancement New feature or request area:semantic-conventions Related to semantic conventions labels Nov 8, 2022
@arminru
Copy link
Member

arminru commented Nov 8, 2022

Hey @frzifus!
This is about the version of k8s itself and not the services deployed on it, right?
Is this something specific to OpenShift or can this value be retrieved for all k8s implementations?

@frzifus
Copy link
Member Author

frzifus commented Nov 8, 2022

Hi @arminru,
you are right. The version info is coming from the k8s API itself. There is a /version endpoint that is also used by kubectl version.

Example Kubernetes API request..
$ curl -H "Authorization: Bearer ${AUTH_TOKEN}" "https://api-k8s.example.com:6443/version"                               
{
  "major": "1",
  "minor": "21",
  "gitVersion": "v1.21.11+5cc9227",
  "gitCommit": "047f86f8e2212f25394de1c8bad35d9426ae0f4c",
  "gitTreeState": "clean",
  "buildDate": "2022-09-20T16:39:45Z",
  "goVersion": "go1.16.12",
  "compiler": "gc",
  "platform": "linux/amd64"
}

Is this something specific to OpenShift or can this value be retrieved for all k8s implementations?

It is Kubernetes specific. While working on the openshift resource proccessor support, i noticed it would be even better to introduce a openshift and kubernetes version too. I assume i would need to create another Issue + PR for that?

Constant Value Example
conventions.AttributeK8SClusterVersion k8s.cluster.version v1.21.11+5cc9227
conventions.AttributeOpenShiftClusterVersion openshift.cluster.version 4.8.51

What are your thoughts on that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:semantic-conventions Related to semantic conventions enhancement New feature or request spec:resource Related to the specification/resource directory
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants