Skip to content

MON-3163: support VPAs #2078

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

Merged
merged 4 commits into from
Apr 26, 2024
Merged

MON-3163: support VPAs #2078

merged 4 commits into from
Apr 26, 2024

Conversation

rexagod
Copy link
Member

@rexagod rexagod commented Aug 29, 2023

Note: This requires the latest KSMv2.10 release to work.


Introduce and leverage KSM's CRS featureset and support VPAs using that.

Details

Logs

I1124 10:31:19.440466       1 wrapper.go:98] "Starting kube-state-metrics"
W1124 10:31:19.440711       1 client_config.go:618] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
I1124 10:31:19.440994       1 server.go:192] "Used default resources"
I1124 10:31:19.441025       1 types.go:184] "Using all namespaces"
I1124 10:31:19.441203       1 server.go:225] "Metric allow-denylisting" allowDenyStatus="Excluding the following lists that were on denylist: ^kube_pod_completion_time$, ^kube_pod_status_scheduled$, ^kube_secret_labels$, ^kube_.+_annotations$, ^
W1124 10:31:19.441221       1 client_config.go:618] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
I1124 10:31:19.441812       1 utils.go:70] "Tested communication with server"
I1124 10:31:19.451429       1 utils.go:75] "Run with Kubernetes cluster version" major="1" minor="27" gitVersion="v1.27.6+d548052" gitTreeState="clean" gitCommit="f3ec0ed759cde48849b6e3117c091b7db90c95fa" platform="linux/amd64"
I1124 10:31:19.451470       1 utils.go:76] "Communication with server successful"
I1124 10:31:19.454001       1 server.go:347] "Started metrics server" metricsServerAddress="127.0.0.1:8081"
I1124 10:31:19.454002       1 server.go:336] "Started kube-state-metrics self metrics server" telemetryAddress="127.0.0.1:8082"
I1124 10:31:19.454187       1 server.go:72] levelinfomsgListening onaddress127.0.0.1:8081
I1124 10:31:19.454229       1 server.go:72] levelinfomsgTLS is disabled.http2falseaddress127.0.0.1:8081
I1124 10:31:19.454188       1 server.go:72] levelinfomsgListening onaddress127.0.0.1:8082
I1124 10:31:19.454271       1 server.go:72] levelinfomsgTLS is disabled.http2falseaddress127.0.0.1:8082
I1124 10:31:22.455661       1 config.go:82] "Using custom resource plural" resource="autoscaling.k8s.io_v1_VerticalPodAutoscaler" plural="verticalpodautoscalers"
I1124 10:31:22.455768       1 discovery.go:274] "discovery finished, cache updated"
I1124 10:31:22.455810       1 metrics_handler.go:99] "Autosharding disabled"
I1124 10:31:22.457445       1 custom_resource_metrics.go:79] "Custom resource state added metrics" familyNames=["kube_customresource_kube_verticalpodautoscaler_annotations_info","kube_customresource_kube_verticalpodautoscaler_labels_info","kube_
I1124 10:31:22.568913       1 builder.go:275] "Active resources" activeStoreNames="certificatesigningrequests,configmaps,cronjobs,daemonsets,deployments,endpoints,horizontalpodautoscalers,ingresses,jobs,leases,limitranges,mutatingwebhookconfigur

Query

Screenshot 2023-11-24 at 16 05 42 Screenshot 2023-11-24 at 16 06 44

Generated ConfigMap

Name:         kube-state-metrics-custom-resource-state-configmap
Namespace:    openshift-monitoring
Labels:       app.kubernetes.io/managed-by=cluster-monitoring-operator
              app.kubernetes.io/part-of=openshift-monitoring
Annotations:  <none>

Data
====
custom-resource-state-configmap.yaml:
----
"kind": "CustomResourceStateMetrics"
"spec":
  "resources":
  - "groupVersionKind":
      "group": "autoscaling.k8s.io"
      "kind": "VerticalPodAutoscaler"
      "version": "v1"
    "metrics":
    - "commonLabels": null
      "each":
        "info":
          "labelsFromPath":
            "*":
            - "metadata"
            - "annotations"
            "container":
            - "containerName"
          "valueFrom": 1
        "type": "Info"
      "help": "Kubernetes annotations converted to Prometheus labels."
      "labelsFromPath":
        "namespace":
        - "metadata"
        - "namespace"
        "target_api_version":
        - "spec"
        - "targetRef"
        - "apiVersion"
        "target_kind":
        - "spec"
        - "targetRef"
        - "kind"
        "target_name":
        - "spec"
        - "targetRef"
        - "name"
        "verticalpodautoscaler":
        - "metadata"
        - "name"
      "name": "kube_verticalpodautoscaler_annotations_info"
    - "commonLabels": null
      "each":
        "info":
          "labelsFromPath":
            "*":
            - "metadata"
            - "labels"
            "container":
            - "containerName"
          "valueFrom": 1
        "type": "Info"
      "help": "Kubernetes labels converted to Prometheus labels."
      "labelsFromPath":
        "namespace":
        - "metadata"
        - "namespace"
        "target_api_version":
        - "spec"
        - "targetRef"
        - "apiVersion"
        "target_kind":
        - "spec"
        - "targetRef"
        - "kind"
        "target_name":
        - "spec"
        - "targetRef"
        - "name"
        "verticalpodautoscaler":
        - "metadata"
        - "name"
      "name": "kube_verticalpodautoscaler_labels_info"
    - "commonLabels": null
      "each":
        "stateSet":
          "labelName": "updatemode"
          "list":
          - "Off"
          - "Initial"
          - "Recreate"
          - "Auto"
          "path":
          - "spec"
          - "updatePolicy"
          - "updateMode"
        "type": "StateSet"
      "help": "Update mode of the VerticalPodAutoscaler."
      "labelsFromPath":
        "namespace":
        - "metadata"
        - "namespace"
        "target_api_version":
        - "spec"
        - "targetRef"
        - "apiVersion"
        "target_kind":
        - "spec"
        - "targetRef"
        - "kind"
        "target_name":
        - "spec"
        - "targetRef"
        - "name"
        "verticalpodautoscaler":
        - "metadata"
        - "name"
      "name": "kube_verticalpodautoscaler_spec_updatepolicy_updatemode"
    - "commonLabels":
        "resource": "cpu"
        "unit": "cores"
      "each":
        "gauge":
          "labelsFromPath":
            "container":
            - "containerName"
          "path":
          - "status"
          - "recommendation"
          - "containerRecommendations"
          "valueFrom":
          - "lowerBound"
          - "cpu"
        "type": "Gauge"
      "help": "Minimum cpu resources the container can use before the VerticalPodAutoscaler updater evicts it."
      "labelsFromPath":
        "namespace":
        - "metadata"
        - "namespace"
        "target_api_version":
        - "spec"
        - "targetRef"
        - "apiVersion"
        "target_kind":
        - "spec"
        - "targetRef"
        - "kind"
        "target_name":
        - "spec"
        - "targetRef"
        - "name"
        "verticalpodautoscaler":
        - "metadata"
        - "name"
      "name": "kube_verticalpodautoscaler_status_recommendation_containerrecommendations_lowerbound_cpu"
    - "commonLabels":
        "resource": "memory"
        "unit": "bytes"
      "each":
        "gauge":
          "labelsFromPath":
            "container":
            - "containerName"
          "path":
          - "status"
          - "recommendation"
          - "containerRecommendations"
          "valueFrom":
          - "lowerBound"
          - "memory"
        "type": "Gauge"
      "help": "Minimum memory resources the container can use before the VerticalPodAutoscaler updater evicts it."
      "labelsFromPath":
        "namespace":
        - "metadata"
        - "namespace"
        "target_api_version":
        - "spec"
        - "targetRef"
        - "apiVersion"
        "target_kind":
        - "spec"
        - "targetRef"
        - "kind"
        "target_name":
        - "spec"
        - "targetRef"
        - "name"
        "verticalpodautoscaler":
        - "metadata"
        - "name"
      "name": "kube_verticalpodautoscaler_status_recommendation_containerrecommendations_lowerbound_memory"
    - "commonLabels":
        "resource": "cpu"
        "unit": "cores"
      "each":
        "gauge":
          "labelsFromPath":
            "container":
            - "containerName"
          "path":
          - "status"
          - "recommendation"
          - "containerRecommendations"
          "valueFrom":
          - "upperBound"
          - "cpu"
        "type": "Gauge"
      "help": "Maximum cpu resources the container can use before the VerticalPodAutoscaler updater evicts it."
      "labelsFromPath":
        "namespace":
        - "metadata"
        - "namespace"
        "target_api_version":
        - "spec"
        - "targetRef"
        - "apiVersion"
        "target_kind":
        - "spec"
        - "targetRef"
        - "kind"
        "target_name":
        - "spec"
        - "targetRef"
        - "name"
        "verticalpodautoscaler":
        - "metadata"
        - "name"
      "name": "kube_verticalpodautoscaler_status_recommendation_containerrecommendations_upperbound_cpu"
    - "commonLabels":
        "resource": "memory"
        "unit": "bytes"
      "each":
        "gauge":
          "labelsFromPath":
            "container":
            - "containerName"
          "path":
          - "status"
          - "recommendation"
          - "containerRecommendations"
          "valueFrom":
          - "upperBound"
          - "memory"
        "type": "Gauge"
      "help": "Maximum memory resources the container can use before the VerticalPodAutoscaler updater evicts it."
      "labelsFromPath":
        "namespace":
        - "metadata"
        - "namespace"
        "target_api_version":
        - "spec"
        - "targetRef"
        - "apiVersion"
        "target_kind":
        - "spec"
        - "targetRef"
        - "kind"
        "target_name":
        - "spec"
        - "targetRef"
        - "name"
        "verticalpodautoscaler":
        - "metadata"
        - "name"
      "name": "kube_verticalpodautoscaler_status_recommendation_containerrecommendations_upperbound_memory"
    - "commonLabels":
        "resource": "cpu"
        "unit": "cores"
      "each":
        "gauge":
          "labelsFromPath":
            "container":
            - "containerName"
          "path":
          - "status"
          - "recommendation"
          - "containerRecommendations"
          "valueFrom":
          - "target"
          - "cpu"
        "type": "Gauge"
      "help": "Target cpu resources the VerticalPodAutoscaler recommends for the container."
      "labelsFromPath":
        "namespace":
        - "metadata"
        - "namespace"
        "target_api_version":
        - "spec"
        - "targetRef"
        - "apiVersion"
        "target_kind":
        - "spec"
        - "targetRef"
        - "kind"
        "target_name":
        - "spec"
        - "targetRef"
        - "name"
        "verticalpodautoscaler":
        - "metadata"
        - "name"
      "name": "kube_verticalpodautoscaler_status_recommendation_containerrecommendations_target_cpu"
    - "commonLabels":
        "resource": "memory"
        "unit": "bytes"
      "each":
        "gauge":
          "labelsFromPath":
            "container":
            - "containerName"
          "path":
          - "status"
          - "recommendation"
          - "containerRecommendations"
          "valueFrom":
          - "target"
          - "memory"
        "type": "Gauge"
      "help": "Target memory resources the VerticalPodAutoscaler recommends for the container."
      "labelsFromPath":
        "namespace":
        - "metadata"
        - "namespace"
        "target_api_version":
        - "spec"
        - "targetRef"
        - "apiVersion"
        "target_kind":
        - "spec"
        - "targetRef"
        - "kind"
        "target_name":
        - "spec"
        - "targetRef"
        - "name"
        "verticalpodautoscaler":
        - "metadata"
        - "name"
      "name": "kube_verticalpodautoscaler_status_recommendation_containerrecommendations_target_memory"
    - "commonLabels":
        "resource": "cpu"
        "unit": "cores"
      "each":
        "gauge":
          "labelsFromPath":
            "container":
            - "containerName"
          "path":
          - "status"
          - "recommendation"
          - "containerRecommendations"
          "valueFrom":
          - "uncappedTarget"
          - "cpu"
        "type": "Gauge"
      "help": "Target cpu resources the VerticalPodAutoscaler recommends for the container ignoring bounds."
      "labelsFromPath":
        "namespace":
        - "metadata"
        - "namespace"
        "target_api_version":
        - "spec"
        - "targetRef"
        - "apiVersion"
        "target_kind":
        - "spec"
        - "targetRef"
        - "kind"
        "target_name":
        - "spec"
        - "targetRef"
        - "name"
        "verticalpodautoscaler":
        - "metadata"
        - "name"
      "name": "kube_verticalpodautoscaler_status_recommendation_containerrecommendations_uncappedtarget_cpu"
    - "commonLabels":
        "resource": "memory"
        "unit": "bytes"
      "each":
        "gauge":
          "labelsFromPath":
            "container":
            - "containerName"
          "path":
          - "status"
          - "recommendation"
          - "containerRecommendations"
          "valueFrom":
          - "uncappedTarget"
          - "memory"
        "type": "Gauge"
      "help": "Target memory resources the VerticalPodAutoscaler recommends for the container ignoring bounds."
      "labelsFromPath":
        "namespace":
        - "metadata"
        - "namespace"
        "target_api_version":
        - "spec"
        - "targetRef"
        - "apiVersion"
        "target_kind":
        - "spec"
        - "targetRef"
        - "kind"
        "target_name":
        - "spec"
        - "targetRef"
        - "name"
        "verticalpodautoscaler":
        - "metadata"
        - "name"
      "name": "kube_verticalpodautoscaler_status_recommendation_containerrecommendations_uncappedtarget_memory"
    - "commonLabels":
        "resource": "cpu"
        "unit": "cores"
      "each":
        "gauge":
          "labelsFromPath":
            "container":
            - "containerName"
          "path":
          - "spec"
          - "resourcePolicy"
          - "containerPolicies"
          "valueFrom":
          - "minAllowed"
          - "cpu"
        "type": "Gauge"
      "help": "Minimum cpu resources the VerticalPodAutoscaler can set for containers matching the name."
      "labelsFromPath":
        "namespace":
        - "metadata"
        - "namespace"
        "target_api_version":
        - "spec"
        - "targetRef"
        - "apiVersion"
        "target_kind":
        - "spec"
        - "targetRef"
        - "kind"
        "target_name":
        - "spec"
        - "targetRef"
        - "name"
        "verticalpodautoscaler":
        - "metadata"
        - "name"
      "name": "kube_verticalpodautoscaler_spec_resourcepolicy_container_policies_minallowed_cpu"
    - "commonLabels":
        "resource": "memory"
        "unit": "bytes"
      "each":
        "gauge":
          "labelsFromPath":
            "container":
            - "containerName"
          "path":
          - "spec"
          - "resourcePolicy"
          - "containerPolicies"
          "valueFrom":
          - "minAllowed"
          - "memory"
        "type": "Gauge"
      "help": "Minimum memory resources the VerticalPodAutoscaler can set for containers matching the name."
      "labelsFromPath":
        "namespace":
        - "metadata"
        - "namespace"
        "target_api_version":
        - "spec"
        - "targetRef"
        - "apiVersion"
        "target_kind":
        - "spec"
        - "targetRef"
        - "kind"
        "target_name":
        - "spec"
        - "targetRef"
        - "name"
        "verticalpodautoscaler":
        - "metadata"
        - "name"
      "name": "kube_verticalpodautoscaler_spec_resourcepolicy_container_policies_minallowed_memory"
    - "commonLabels":
        "resource": "cpu"
        "unit": "cores"
      "each":
        "gauge":
          "labelsFromPath":
            "container":
            - "containerName"
          "path":
          - "spec"
          - "resourcePolicy"
          - "containerPolicies"
          "valueFrom":
          - "maxAllowed"
          - "cpu"
        "type": "Gauge"
      "help": "Minimum cpu resources the VerticalPodAutoscaler can set for containers matching the name."
      "labelsFromPath":
        "namespace":
        - "metadata"
        - "namespace"
        "target_api_version":
        - "spec"
        - "targetRef"
        - "apiVersion"
        "target_kind":
        - "spec"
        - "targetRef"
        - "kind"
        "target_name":
        - "spec"
        - "targetRef"
        - "name"
        "verticalpodautoscaler":
        - "metadata"
        - "name"
      "name": "kube_verticalpodautoscaler_spec_resourcepolicy_container_policies_maxallowed_cpu"
    - "commonLabels":
        "resource": "memory"
        "unit": "bytes"
      "each":
        "gauge":
          "labelsFromPath":
            "container":
            - "containerName"
          "path":
          - "spec"
          - "resourcePolicy"
          - "containerPolicies"
          "valueFrom":
          - "maxAllowed"
          - "memory"
        "type": "Gauge"
      "help": "Minimum memory resources the VerticalPodAutoscaler can set for containers matching the name."
      "labelsFromPath":
        "namespace":
        - "metadata"
        - "namespace"
        "target_api_version":
        - "spec"
        - "targetRef"
        - "apiVersion"
        "target_kind":
        - "spec"
        - "targetRef"
        - "kind"
        "target_name":
        - "spec"
        - "targetRef"
        - "name"
        "verticalpodautoscaler":
        - "metadata"
        - "name"
      "name": "kube_verticalpodautoscaler_spec_resourcepolicy_container_policies_maxallowed_memory"

BinaryData
====

Events:  <none>
  • I added CHANGELOG entry for this change.

@rexagod rexagod changed the title feat: support VPAs MON-3163: support VPAs Aug 29, 2023
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 29, 2023
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 29, 2023

@rexagod: This pull request references MON-3163 which is a valid jira issue.

In response to this:

Introduce and leverage KSM's CRS featureset and support VPAs using that.

  • [PENDING] I added CHANGELOG entry for this change.
  • [ ] No user facing changes, so no entry in CHANGELOG was needed.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

1 similar comment
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 29, 2023

@rexagod: This pull request references MON-3163 which is a valid jira issue.

In response to this:

Introduce and leverage KSM's CRS featureset and support VPAs using that.

  • [PENDING] I added CHANGELOG entry for this change.
  • [ ] No user facing changes, so no entry in CHANGELOG was needed.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci openshift-ci bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Aug 29, 2023
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Aug 29, 2023

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Aug 29, 2023

@rexagod: This pull request references MON-3163 which is a valid jira issue.

In response to this:

Introduce and leverage KSM's CRS featureset and support VPAs using that.

  • [PENDING] I added CHANGELOG entry for this change.
  • [ ] No user facing changes, so no entry in CHANGELOG was needed.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rexagod rexagod force-pushed the 2858 branch 2 times, most recently from 4120fa0 to a619580 Compare September 4, 2023 14:10
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Sep 4, 2023

@rexagod: This pull request references MON-3163 which is a valid jira issue.

In response to this:

Note: This requires the latest KSMv2.10 release to work.


Introduce and leverage KSM's CRS featureset and support VPAs using that.

  • [PENDING] I added CHANGELOG entry for this change.
  • [ ] No user facing changes, so no entry in CHANGELOG was needed.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rexagod rexagod marked this pull request as ready for review September 4, 2023 16:12
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 4, 2023
@openshift-ci openshift-ci bot requested review from marioferh and sthaha September 4, 2023 16:13
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Sep 4, 2023

@rexagod: This pull request references MON-3163 which is a valid jira issue.

In response to this:

Note: This requires the latest KSMv2.10 release to work.


Introduce and leverage KSM's CRS featureset and support VPAs using that.

  • [*] I added CHANGELOG entry for this change.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Sep 4, 2023

@rexagod: This pull request references MON-3163 which is a valid jira issue.

In response to this:

Note: This requires the latest KSMv2.10 release to work.


Introduce and leverage KSM's CRS featureset and support VPAs using that.

  • I added CHANGELOG entry for this change.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rexagod
Copy link
Member Author

rexagod commented Sep 4, 2023

/jira refresh

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Sep 4, 2023

@rexagod: This pull request references MON-3163 which is a valid jira issue.

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jan--f
Copy link
Contributor

jan--f commented Sep 13, 2023

/cc

@openshift-ci openshift-ci bot requested a review from jan--f September 13, 2023 14:25
Copy link
Contributor

@jan--f jan--f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done a first pass, things looks good.
I find the new jsonnet file a little hard to follow, but I need to reacquaint myself a bit with jsonnet before I'll come back with something constructive.

@jan--f
Copy link
Contributor

jan--f commented Sep 21, 2023

Proposed some jsonnet changes in rexagod#1

@rexagod rexagod requested a review from jan--f October 31, 2023 08:44
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 31, 2023
@rexagod
Copy link
Member Author

rexagod commented Nov 21, 2023

/retest
/jira refresh

@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Nov 21, 2023

@rexagod: This pull request references MON-3163 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the task to target the "4.15.0" version, but no target version was set.

In response to this:

/retest
/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rexagod
Copy link
Member Author

rexagod commented Nov 21, 2023

/retest

@jan--f
Copy link
Contributor

jan--f commented Apr 24, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 24, 2024
Copy link
Contributor

openshift-ci bot commented Apr 24, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jan--f, rexagod

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jan--f
Copy link
Contributor

jan--f commented Apr 24, 2024

@rexagod feel free to unhold unless this still needs review from a VPA team.

@rexagod
Copy link
Member Author

rexagod commented Apr 24, 2024

@jan--f Just to clarify, do you mean the Node team (Joel)? They were the ones with this request initially.

Or should I ping the autoscaling team to get a review here?

PS. As you know, VPA metrics being introduced here are more of a "re-introduction" since these used to exist within KSM before being deprecated, adhering to the same behavior that they had, so I believe we should be safe to /unhold this either way. But LMK otherwise and I'll ping the teams.

@jan--f
Copy link
Contributor

jan--f commented Apr 24, 2024

You added a hold a while back in #2078 (comment)

I just didn't want to preempt anything. Feel free to unhold unless you want anyone else's eyes on this.

@rexagod
Copy link
Member Author

rexagod commented Apr 24, 2024

ACK, I've pinged the autoscaling team to take a look. 🤞🏼

@rexagod
Copy link
Member Author

rexagod commented Apr 24, 2024

/test e2e-aws-ovn-single-node

We might have to skip this one, since the failures do not indicate any issues with the patch itself.

@jan--f
Copy link
Contributor

jan--f commented Apr 24, 2024

The single node test is not required...that won't block the merge. Only the hold label blocks this currently.

@joelsmith
Copy link

LGTM, thanks!

@rexagod
Copy link
Member Author

rexagod commented Apr 25, 2024

/unhold

Thanks, Joel! Unholding now.

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 25, 2024
@jan--f
Copy link
Contributor

jan--f commented Apr 25, 2024

/retest

@juzhao
Copy link
Contributor

juzhao commented Apr 25, 2024

@jan--f
Copy link
Contributor

jan--f commented Apr 25, 2024

/hold
might be worth fixing the bug first

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 25, 2024
@rexagod
Copy link
Member Author

rexagod commented Apr 25, 2024

Simon and I went over this here: #2078 (comment), PTAL.

@juzhao
Copy link
Contributor

juzhao commented Apr 25, 2024

Simon and I went over this here: #2078 (comment), PTAL.

thanks for the explanation, let the kube-state-metrics pod run for a few time, the error only shown once, delete the kube-state-metrics pod, watch for a while, no such errors.

@juzhao
Copy link
Contributor

juzhao commented Apr 25, 2024

/label qe-approved

@openshift-ci openshift-ci bot added the qe-approved Signifies that QE has signed off on this PR label Apr 25, 2024
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Apr 25, 2024

@rexagod: This pull request references MON-3163 which is a valid jira issue.

In response to this:

Note: This requires the latest KSMv2.10 release to work.


Introduce and leverage KSM's CRS featureset and support VPAs using that.

Details

Logs

I1124 10:31:19.440466       1 wrapper.go:98] "Starting kube-state-metrics"
W1124 10:31:19.440711       1 client_config.go:618] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
I1124 10:31:19.440994       1 server.go:192] "Used default resources"
I1124 10:31:19.441025       1 types.go:184] "Using all namespaces"
I1124 10:31:19.441203       1 server.go:225] "Metric allow-denylisting" allowDenyStatus="Excluding the following lists that were on denylist: ^kube_pod_completion_time$, ^kube_pod_status_scheduled$, ^kube_secret_labels$, ^kube_.+_annotations$, ^
W1124 10:31:19.441221       1 client_config.go:618] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
I1124 10:31:19.441812       1 utils.go:70] "Tested communication with server"
I1124 10:31:19.451429       1 utils.go:75] "Run with Kubernetes cluster version" major="1" minor="27" gitVersion="v1.27.6+d548052" gitTreeState="clean" gitCommit="f3ec0ed759cde48849b6e3117c091b7db90c95fa" platform="linux/amd64"
I1124 10:31:19.451470       1 utils.go:76] "Communication with server successful"
I1124 10:31:19.454001       1 server.go:347] "Started metrics server" metricsServerAddress="127.0.0.1:8081"
I1124 10:31:19.454002       1 server.go:336] "Started kube-state-metrics self metrics server" telemetryAddress="127.0.0.1:8082"
I1124 10:31:19.454187       1 server.go:72] levelinfomsgListening onaddress127.0.0.1:8081
I1124 10:31:19.454229       1 server.go:72] levelinfomsgTLS is disabled.http2falseaddress127.0.0.1:8081
I1124 10:31:19.454188       1 server.go:72] levelinfomsgListening onaddress127.0.0.1:8082
I1124 10:31:19.454271       1 server.go:72] levelinfomsgTLS is disabled.http2falseaddress127.0.0.1:8082
I1124 10:31:22.455661       1 config.go:82] "Using custom resource plural" resource="autoscaling.k8s.io_v1_VerticalPodAutoscaler" plural="verticalpodautoscalers"
I1124 10:31:22.455768       1 discovery.go:274] "discovery finished, cache updated"
I1124 10:31:22.455810       1 metrics_handler.go:99] "Autosharding disabled"
I1124 10:31:22.457445       1 custom_resource_metrics.go:79] "Custom resource state added metrics" familyNames=["kube_customresource_kube_verticalpodautoscaler_annotations_info","kube_customresource_kube_verticalpodautoscaler_labels_info","kube_
I1124 10:31:22.568913       1 builder.go:275] "Active resources" activeStoreNames="certificatesigningrequests,configmaps,cronjobs,daemonsets,deployments,endpoints,horizontalpodautoscalers,ingresses,jobs,leases,limitranges,mutatingwebhookconfigur

Query

Screenshot 2023-11-24 at 16 05 42 Screenshot 2023-11-24 at 16 06 44

Generated ConfigMap

Name:         kube-state-metrics-custom-resource-state-configmap
Namespace:    openshift-monitoring
Labels:       app.kubernetes.io/managed-by=cluster-monitoring-operator
             app.kubernetes.io/part-of=openshift-monitoring
Annotations:  <none>

Data
====
custom-resource-state-configmap.yaml:
----
"kind": "CustomResourceStateMetrics"
"spec":
 "resources":
 - "groupVersionKind":
     "group": "autoscaling.k8s.io"
     "kind": "VerticalPodAutoscaler"
     "version": "v1"
   "metrics":
   - "commonLabels": null
     "each":
       "info":
         "labelsFromPath":
           "*":
           - "metadata"
           - "annotations"
           "container":
           - "containerName"
         "valueFrom": 1
       "type": "Info"
     "help": "Kubernetes annotations converted to Prometheus labels."
     "labelsFromPath":
       "namespace":
       - "metadata"
       - "namespace"
       "target_api_version":
       - "spec"
       - "targetRef"
       - "apiVersion"
       "target_kind":
       - "spec"
       - "targetRef"
       - "kind"
       "target_name":
       - "spec"
       - "targetRef"
       - "name"
       "verticalpodautoscaler":
       - "metadata"
       - "name"
     "name": "kube_verticalpodautoscaler_annotations_info"
   - "commonLabels": null
     "each":
       "info":
         "labelsFromPath":
           "*":
           - "metadata"
           - "labels"
           "container":
           - "containerName"
         "valueFrom": 1
       "type": "Info"
     "help": "Kubernetes labels converted to Prometheus labels."
     "labelsFromPath":
       "namespace":
       - "metadata"
       - "namespace"
       "target_api_version":
       - "spec"
       - "targetRef"
       - "apiVersion"
       "target_kind":
       - "spec"
       - "targetRef"
       - "kind"
       "target_name":
       - "spec"
       - "targetRef"
       - "name"
       "verticalpodautoscaler":
       - "metadata"
       - "name"
     "name": "kube_verticalpodautoscaler_labels_info"
   - "commonLabels": null
     "each":
       "stateSet":
         "labelName": "updatemode"
         "list":
         - "Off"
         - "Initial"
         - "Recreate"
         - "Auto"
         "path":
         - "spec"
         - "updatePolicy"
         - "updateMode"
       "type": "StateSet"
     "help": "Update mode of the VerticalPodAutoscaler."
     "labelsFromPath":
       "namespace":
       - "metadata"
       - "namespace"
       "target_api_version":
       - "spec"
       - "targetRef"
       - "apiVersion"
       "target_kind":
       - "spec"
       - "targetRef"
       - "kind"
       "target_name":
       - "spec"
       - "targetRef"
       - "name"
       "verticalpodautoscaler":
       - "metadata"
       - "name"
     "name": "kube_verticalpodautoscaler_spec_updatepolicy_updatemode"
   - "commonLabels":
       "resource": "cpu"
       "unit": "cores"
     "each":
       "gauge":
         "labelsFromPath":
           "container":
           - "containerName"
         "path":
         - "status"
         - "recommendation"
         - "containerRecommendations"
         "valueFrom":
         - "lowerBound"
         - "cpu"
       "type": "Gauge"
     "help": "Minimum cpu resources the container can use before the VerticalPodAutoscaler updater evicts it."
     "labelsFromPath":
       "namespace":
       - "metadata"
       - "namespace"
       "target_api_version":
       - "spec"
       - "targetRef"
       - "apiVersion"
       "target_kind":
       - "spec"
       - "targetRef"
       - "kind"
       "target_name":
       - "spec"
       - "targetRef"
       - "name"
       "verticalpodautoscaler":
       - "metadata"
       - "name"
     "name": "kube_verticalpodautoscaler_status_recommendation_containerrecommendations_lowerbound_cpu"
   - "commonLabels":
       "resource": "memory"
       "unit": "bytes"
     "each":
       "gauge":
         "labelsFromPath":
           "container":
           - "containerName"
         "path":
         - "status"
         - "recommendation"
         - "containerRecommendations"
         "valueFrom":
         - "lowerBound"
         - "memory"
       "type": "Gauge"
     "help": "Minimum memory resources the container can use before the VerticalPodAutoscaler updater evicts it."
     "labelsFromPath":
       "namespace":
       - "metadata"
       - "namespace"
       "target_api_version":
       - "spec"
       - "targetRef"
       - "apiVersion"
       "target_kind":
       - "spec"
       - "targetRef"
       - "kind"
       "target_name":
       - "spec"
       - "targetRef"
       - "name"
       "verticalpodautoscaler":
       - "metadata"
       - "name"
     "name": "kube_verticalpodautoscaler_status_recommendation_containerrecommendations_lowerbound_memory"
   - "commonLabels":
       "resource": "cpu"
       "unit": "cores"
     "each":
       "gauge":
         "labelsFromPath":
           "container":
           - "containerName"
         "path":
         - "status"
         - "recommendation"
         - "containerRecommendations"
         "valueFrom":
         - "upperBound"
         - "cpu"
       "type": "Gauge"
     "help": "Maximum cpu resources the container can use before the VerticalPodAutoscaler updater evicts it."
     "labelsFromPath":
       "namespace":
       - "metadata"
       - "namespace"
       "target_api_version":
       - "spec"
       - "targetRef"
       - "apiVersion"
       "target_kind":
       - "spec"
       - "targetRef"
       - "kind"
       "target_name":
       - "spec"
       - "targetRef"
       - "name"
       "verticalpodautoscaler":
       - "metadata"
       - "name"
     "name": "kube_verticalpodautoscaler_status_recommendation_containerrecommendations_upperbound_cpu"
   - "commonLabels":
       "resource": "memory"
       "unit": "bytes"
     "each":
       "gauge":
         "labelsFromPath":
           "container":
           - "containerName"
         "path":
         - "status"
         - "recommendation"
         - "containerRecommendations"
         "valueFrom":
         - "upperBound"
         - "memory"
       "type": "Gauge"
     "help": "Maximum memory resources the container can use before the VerticalPodAutoscaler updater evicts it."
     "labelsFromPath":
       "namespace":
       - "metadata"
       - "namespace"
       "target_api_version":
       - "spec"
       - "targetRef"
       - "apiVersion"
       "target_kind":
       - "spec"
       - "targetRef"
       - "kind"
       "target_name":
       - "spec"
       - "targetRef"
       - "name"
       "verticalpodautoscaler":
       - "metadata"
       - "name"
     "name": "kube_verticalpodautoscaler_status_recommendation_containerrecommendations_upperbound_memory"
   - "commonLabels":
       "resource": "cpu"
       "unit": "cores"
     "each":
       "gauge":
         "labelsFromPath":
           "container":
           - "containerName"
         "path":
         - "status"
         - "recommendation"
         - "containerRecommendations"
         "valueFrom":
         - "target"
         - "cpu"
       "type": "Gauge"
     "help": "Target cpu resources the VerticalPodAutoscaler recommends for the container."
     "labelsFromPath":
       "namespace":
       - "metadata"
       - "namespace"
       "target_api_version":
       - "spec"
       - "targetRef"
       - "apiVersion"
       "target_kind":
       - "spec"
       - "targetRef"
       - "kind"
       "target_name":
       - "spec"
       - "targetRef"
       - "name"
       "verticalpodautoscaler":
       - "metadata"
       - "name"
     "name": "kube_verticalpodautoscaler_status_recommendation_containerrecommendations_target_cpu"
   - "commonLabels":
       "resource": "memory"
       "unit": "bytes"
     "each":
       "gauge":
         "labelsFromPath":
           "container":
           - "containerName"
         "path":
         - "status"
         - "recommendation"
         - "containerRecommendations"
         "valueFrom":
         - "target"
         - "memory"
       "type": "Gauge"
     "help": "Target memory resources the VerticalPodAutoscaler recommends for the container."
     "labelsFromPath":
       "namespace":
       - "metadata"
       - "namespace"
       "target_api_version":
       - "spec"
       - "targetRef"
       - "apiVersion"
       "target_kind":
       - "spec"
       - "targetRef"
       - "kind"
       "target_name":
       - "spec"
       - "targetRef"
       - "name"
       "verticalpodautoscaler":
       - "metadata"
       - "name"
     "name": "kube_verticalpodautoscaler_status_recommendation_containerrecommendations_target_memory"
   - "commonLabels":
       "resource": "cpu"
       "unit": "cores"
     "each":
       "gauge":
         "labelsFromPath":
           "container":
           - "containerName"
         "path":
         - "status"
         - "recommendation"
         - "containerRecommendations"
         "valueFrom":
         - "uncappedTarget"
         - "cpu"
       "type": "Gauge"
     "help": "Target cpu resources the VerticalPodAutoscaler recommends for the container ignoring bounds."
     "labelsFromPath":
       "namespace":
       - "metadata"
       - "namespace"
       "target_api_version":
       - "spec"
       - "targetRef"
       - "apiVersion"
       "target_kind":
       - "spec"
       - "targetRef"
       - "kind"
       "target_name":
       - "spec"
       - "targetRef"
       - "name"
       "verticalpodautoscaler":
       - "metadata"
       - "name"
     "name": "kube_verticalpodautoscaler_status_recommendation_containerrecommendations_uncappedtarget_cpu"
   - "commonLabels":
       "resource": "memory"
       "unit": "bytes"
     "each":
       "gauge":
         "labelsFromPath":
           "container":
           - "containerName"
         "path":
         - "status"
         - "recommendation"
         - "containerRecommendations"
         "valueFrom":
         - "uncappedTarget"
         - "memory"
       "type": "Gauge"
     "help": "Target memory resources the VerticalPodAutoscaler recommends for the container ignoring bounds."
     "labelsFromPath":
       "namespace":
       - "metadata"
       - "namespace"
       "target_api_version":
       - "spec"
       - "targetRef"
       - "apiVersion"
       "target_kind":
       - "spec"
       - "targetRef"
       - "kind"
       "target_name":
       - "spec"
       - "targetRef"
       - "name"
       "verticalpodautoscaler":
       - "metadata"
       - "name"
     "name": "kube_verticalpodautoscaler_status_recommendation_containerrecommendations_uncappedtarget_memory"
   - "commonLabels":
       "resource": "cpu"
       "unit": "cores"
     "each":
       "gauge":
         "labelsFromPath":
           "container":
           - "containerName"
         "path":
         - "spec"
         - "resourcePolicy"
         - "containerPolicies"
         "valueFrom":
         - "minAllowed"
         - "cpu"
       "type": "Gauge"
     "help": "Minimum cpu resources the VerticalPodAutoscaler can set for containers matching the name."
     "labelsFromPath":
       "namespace":
       - "metadata"
       - "namespace"
       "target_api_version":
       - "spec"
       - "targetRef"
       - "apiVersion"
       "target_kind":
       - "spec"
       - "targetRef"
       - "kind"
       "target_name":
       - "spec"
       - "targetRef"
       - "name"
       "verticalpodautoscaler":
       - "metadata"
       - "name"
     "name": "kube_verticalpodautoscaler_spec_resourcepolicy_container_policies_minallowed_cpu"
   - "commonLabels":
       "resource": "memory"
       "unit": "bytes"
     "each":
       "gauge":
         "labelsFromPath":
           "container":
           - "containerName"
         "path":
         - "spec"
         - "resourcePolicy"
         - "containerPolicies"
         "valueFrom":
         - "minAllowed"
         - "memory"
       "type": "Gauge"
     "help": "Minimum memory resources the VerticalPodAutoscaler can set for containers matching the name."
     "labelsFromPath":
       "namespace":
       - "metadata"
       - "namespace"
       "target_api_version":
       - "spec"
       - "targetRef"
       - "apiVersion"
       "target_kind":
       - "spec"
       - "targetRef"
       - "kind"
       "target_name":
       - "spec"
       - "targetRef"
       - "name"
       "verticalpodautoscaler":
       - "metadata"
       - "name"
     "name": "kube_verticalpodautoscaler_spec_resourcepolicy_container_policies_minallowed_memory"
   - "commonLabels":
       "resource": "cpu"
       "unit": "cores"
     "each":
       "gauge":
         "labelsFromPath":
           "container":
           - "containerName"
         "path":
         - "spec"
         - "resourcePolicy"
         - "containerPolicies"
         "valueFrom":
         - "maxAllowed"
         - "cpu"
       "type": "Gauge"
     "help": "Minimum cpu resources the VerticalPodAutoscaler can set for containers matching the name."
     "labelsFromPath":
       "namespace":
       - "metadata"
       - "namespace"
       "target_api_version":
       - "spec"
       - "targetRef"
       - "apiVersion"
       "target_kind":
       - "spec"
       - "targetRef"
       - "kind"
       "target_name":
       - "spec"
       - "targetRef"
       - "name"
       "verticalpodautoscaler":
       - "metadata"
       - "name"
     "name": "kube_verticalpodautoscaler_spec_resourcepolicy_container_policies_maxallowed_cpu"
   - "commonLabels":
       "resource": "memory"
       "unit": "bytes"
     "each":
       "gauge":
         "labelsFromPath":
           "container":
           - "containerName"
         "path":
         - "spec"
         - "resourcePolicy"
         - "containerPolicies"
         "valueFrom":
         - "maxAllowed"
         - "memory"
       "type": "Gauge"
     "help": "Minimum memory resources the VerticalPodAutoscaler can set for containers matching the name."
     "labelsFromPath":
       "namespace":
       - "metadata"
       - "namespace"
       "target_api_version":
       - "spec"
       - "targetRef"
       - "apiVersion"
       "target_kind":
       - "spec"
       - "targetRef"
       - "kind"
       "target_name":
       - "spec"
       - "targetRef"
       - "name"
       "verticalpodautoscaler":
       - "metadata"
       - "name"
     "name": "kube_verticalpodautoscaler_spec_resourcepolicy_container_policies_maxallowed_memory"

BinaryData
====

Events:  <none>
  • I added CHANGELOG entry for this change.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@rexagod
Copy link
Member Author

rexagod commented Apr 25, 2024

/retest
/hold cancel

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 25, 2024
@rexagod
Copy link
Member Author

rexagod commented Apr 25, 2024

/hold

Just to make sure #2078 (comment) looks good to Jan, in which case, feel free to unhold.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 25, 2024
@jan--f
Copy link
Contributor

jan--f commented Apr 26, 2024

Thanks for the details.
/unhold
/retest

@openshift-ci openshift-ci bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 26, 2024
Copy link
Contributor

openshift-ci bot commented Apr 26, 2024

@rexagod: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit 77f948e into openshift:master Apr 26, 2024
17 checks passed
@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

This PR has been included in build cluster-monitoring-operator-container-v4.16.0-202404261114.p0.g77f948e.assembly.stream.el9 for distgit cluster-monitoring-operator.
All builds following this will include this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. qe-approved Signifies that QE has signed off on this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants