Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-12825

4.14 prometheus image should be built with go1.20

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done-Errata
    • Icon: Normal Normal
    • 4.14.0
    • 4.14.0
    • Monitoring
    • None
    • No
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required

      Description of problem:

      based on bugs from ART team, example: https://issues.redhat.com/browse/OCPBUGS-12347, 4.14 image should be built with go 1.20, but prometheus container image is built by go1.19.6

      $ token=`oc create token prometheus-k8s -n openshift-monitoring`
      $ oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- curl -k -H "Authorization: Bearer $token" 'https://thanos-querier.openshift-monitoring.svc:9091/api/v1/label/goversion/values' | jq
      {
        "status": "success",
        "data": [
          "go1.19.6",
          "go1.20.3"
        ]
      }

      searched from thanos API

      $ oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- curl -k -H "Authorization: Bearer $token" 'https://thanos-querier.openshift-monitoring.svc:9091/api/v1/query?' --data-urlencode 'query={__name__=~".*",goversion="go1.19.6"}' | jq
      {
        "status": "success",
        "data": {
          "resultType": "vector",
          "result": [
            {
              "metric": {
                "__name__": "prometheus_build_info",
                "branch": "rhaos-4.14-rhel-8",
                "container": "kube-rbac-proxy",
                "endpoint": "metrics",
                "goarch": "amd64",
                "goos": "linux",
                "goversion": "go1.19.6",
                "instance": "10.128.2.19:9092",
                "job": "prometheus-k8s",
                "namespace": "openshift-monitoring",
                "pod": "prometheus-k8s-0",
                "prometheus": "openshift-monitoring/k8s",
                "revision": "fe01b9f83cb8190fc8f04c16f4e05e87217ab03e",
                "service": "prometheus-k8s",
                "tags": "unknown",
                "version": "2.43.0"
              },
              "value": [
                1682576802.496,
                "1"
              ]
            },
      ...

      prometheus-k8s-0 container name: [prometheus config-reloader thanos-sidecar prometheus-proxy kube-rbac-proxy kube-rbac-proxy-thanos], prometheus image is built with go1.19.6

      $ oc -n openshift-monitoring exec -c prometheus prometheus-k8s-0 -- prometheus --version
      prometheus, version 2.43.0 (branch: rhaos-4.14-rhel-8, revision: fe01b9f83cb8190fc8f04c16f4e05e87217ab03e)
        build user:       root@402ffbe02b57
        build date:       20230422-00:43:08
        go version:       go1.19.6
        platform:         linux/amd64
        tags:             unknown
      
      $ oc -n openshift-monitoring exec -c config-reloader prometheus-k8s-0 -- prometheus-config-reloader --version
      prometheus-config-reloader, version 0.63.0 (branch: rhaos-4.14-rhel-8, revision: ce71a7d)
        build user:       root
        build date:       20230424-15:53:51
        go version:       go1.20.3
        platform:         linux/amd64
      
      $ oc -n openshift-monitoring exec -c thanos-sidecar prometheus-k8s-0 -- thanos --version
      thanos, version 0.31.0 (branch: rhaos-4.14-rhel-8, revision: d58df6d218925fd007e16965f50047c9a4194c42)
        build user:       root@c070c5e6af32
        build date:       20230422-00:44:21
        go version:       go1.20.3
        platform:         linux/amd64
      
      
      # owned by oauth team, not responsible by Monitoring
      $ oc -n openshift-monitoring exec -c prometheus-proxy prometheus-k8s-0 -- oauth-proxy --version
      oauth2_proxy was built with go1.18.10
      
      # below isssue is tracked by bug OCPBUGS-12821
      $ oc -n openshift-monitoring exec -c kube-rbac-proxy prometheus-k8s-0 -- kube-rbac-proxy --version
      Kubernetes v0.0.0-master+$Format:%H$
      
      $ oc -n openshift-monitoring exec -c kube-rbac-proxy-thanos prometheus-k8s-0 -- kube-rbac-proxy --version
      Kubernetes v0.0.0-master+$Format:%H$
      

      should fix files
      https://github.com/openshift/prometheus/blob/master/.ci-operator.yaml#L4
      https://github.com/openshift/prometheus/blob/master/Dockerfile.ocp#L1

       

      Version-Release number of selected component (if applicable):

      4.14.0-0.nightly-2023-04-26-154754  

      How reproducible:

      always
      

      Actual results:

      4.14 prometheus is built with go1.19.6

      Expected results:

      4.14 prometheus image should be built with go1.20

      Additional info:

      no functional impact

              spasquie@redhat.com Simon Pasquier
              juzhao@redhat.com Junqi Zhao
              Junqi Zhao Junqi Zhao
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: