Skip to content

Commit

Permalink
[k8sclusterreceiver] remove k8s.kubeproxy.version resource attribute (#…
Browse files Browse the repository at this point in the history
…31180)

**Description:** Remove deprecated resource attribute. Deprecation happened in 0.92.0

**Link to tracking Issue:** #29748 (comment)
  • Loading branch information
povilasv committed Feb 27, 2024
1 parent 9378d9b commit 2b74c37
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 51 deletions.
27 changes: 27 additions & 0 deletions .chloggen/rm-kube-proxy.yaml
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: breaking

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: k8sclusterreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: "Remove deprecated k8s.kubeproxy.version resource attribute"

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [29748]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
1 change: 0 additions & 1 deletion receiver/k8sclusterreceiver/documentation.md
Expand Up @@ -439,7 +439,6 @@ Current status reason of the pod (1 - Evicted, 2 - NodeAffinity, 3 - NodeLost, 4
| k8s.job.name | The k8s pod name. | Any Str | true |
| k8s.job.uid | The k8s job uid. | Any Str | true |
| k8s.kubelet.version | The version of Kubelet running on the node. | Any Str | false |
| k8s.kubeproxy.version | The version of Kube Proxy running on the node. | Any Str | false |
| k8s.namespace.name | The k8s namespace name. | Any Str | true |
| k8s.namespace.uid | The k8s namespace uid. | Any Str | true |
| k8s.node.name | The k8s node name. | Any Str | true |
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -124,8 +124,6 @@ all_set:
enabled: true
k8s.kubelet.version:
enabled: true
k8s.kubeproxy.version:
enabled: true
k8s.namespace.name:
enabled: true
k8s.namespace.uid:
Expand Down Expand Up @@ -289,8 +287,6 @@ none_set:
enabled: false
k8s.kubelet.version:
enabled: false
k8s.kubeproxy.version:
enabled: false
k8s.namespace.name:
enabled: false
k8s.namespace.uid:
Expand Down
3 changes: 0 additions & 3 deletions receiver/k8sclusterreceiver/internal/node/nodes.go
Expand Up @@ -36,7 +36,6 @@ func Transform(node *corev1.Node) *corev1.Node {
Allocatable: node.Status.Allocatable,
NodeInfo: corev1.NodeSystemInfo{
KubeletVersion: node.Status.NodeInfo.KubeletVersion,
KubeProxyVersion: node.Status.NodeInfo.KubeProxyVersion,
ContainerRuntimeVersion: node.Status.NodeInfo.ContainerRuntimeVersion,
OSImage: node.Status.NodeInfo.OSImage,
OperatingSystem: node.Status.NodeInfo.OperatingSystem,
Expand All @@ -60,7 +59,6 @@ func RecordMetrics(mb *imetadata.MetricsBuilder, node *corev1.Node, ts pcommon.T
rb.SetK8sNodeUID(string(node.UID))
rb.SetK8sNodeName(node.Name)
rb.SetK8sKubeletVersion(node.Status.NodeInfo.KubeletVersion)
rb.SetK8sKubeproxyVersion(node.Status.NodeInfo.KubeProxyVersion)

mb.EmitForResource(imetadata.WithResource(rb.Emit()))
}
Expand Down Expand Up @@ -114,7 +112,6 @@ func CustomMetrics(set receiver.CreateSettings, rb *metadata.ResourceBuilder, no
rb.SetK8sNodeUID(string(node.UID))
rb.SetK8sNodeName(node.Name)
rb.SetK8sKubeletVersion(node.Status.NodeInfo.KubeletVersion)
rb.SetK8sKubeproxyVersion(node.Status.NodeInfo.KubeProxyVersion)
rb.SetOsType(node.Status.NodeInfo.OperatingSystem)

runtime, version := getContainerRuntimeInfo(node.Status.NodeInfo.ContainerRuntimeVersion)
Expand Down
2 changes: 0 additions & 2 deletions receiver/k8sclusterreceiver/internal/node/nodes_test.go
Expand Up @@ -65,7 +65,6 @@ func TestNodeOptionalMetrics(t *testing.T) {
n := testutils.NewNode("2")
rac := metadata.DefaultResourceAttributesConfig()
rac.K8sKubeletVersion.Enabled = true
rac.K8sKubeproxyVersion.Enabled = true
rac.ContainerRuntime.Enabled = true
rac.ContainerRuntimeVersion.Enabled = true
rac.OsType.Enabled = true
Expand Down Expand Up @@ -255,7 +254,6 @@ func TestTransform(t *testing.T) {
},
NodeInfo: corev1.NodeSystemInfo{
KubeletVersion: "v1.25.3",
KubeProxyVersion: "v1.25.3",
OSImage: "Ubuntu 22.04.1 LTS",
ContainerRuntimeVersion: "containerd://1.6.9",
OperatingSystem: "linux",
Expand Down
Expand Up @@ -10,9 +10,6 @@ resourceMetrics:
- key: k8s.kubelet.version
value:
stringValue: v1.25.3
- key: k8s.kubeproxy.version
value:
stringValue: v1.25.3
- key: container.runtime.version
value:
stringValue: "1.6.9"
Expand Down
1 change: 0 additions & 1 deletion receiver/k8sclusterreceiver/internal/testutils/objects.go
Expand Up @@ -202,7 +202,6 @@ func NewNode(id string) *corev1.Node {
},
NodeInfo: corev1.NodeSystemInfo{
KubeletVersion: "v1.25.3",
KubeProxyVersion: "v1.25.3",
OSImage: "Ubuntu 22.04.1 LTS",
ContainerRuntimeVersion: "containerd://1.6.9",
OperatingSystem: "linux",
Expand Down
7 changes: 0 additions & 7 deletions receiver/k8sclusterreceiver/metadata.yaml
Expand Up @@ -182,13 +182,6 @@ resource_attributes:
type: string
enabled: false

k8s.kubeproxy.version:
description: The version of Kube Proxy running on the node.
type: string
enabled: false
warnings:
if_configured: k8s.kubeproxy.version resource attribute is deprecated and will be removed soon.

openshift.clusterquota.uid:
description: The k8s ClusterResourceQuota uid.
type: string
Expand Down

0 comments on commit 2b74c37

Please sign in to comment.