Skip to content

Conversation

@akhilnittala
Copy link
Contributor

@akhilnittala akhilnittala commented Nov 13, 2025

What type of PR is this?

Uncomment only one /kind line, and delete the rest.
For example, > /kind bug would simply become: /kind bug

/kind bug

/kind cleanup
/kind failing-test
/kind enhancement
/kind documentation
/kind code-refactoring

What does this PR do / why we need it:
The latest Prometheus upgrade enforces stricter security practices by requiring the use of Secrets and ConfigMaps for bearer tokens and TLS CA configurations. However, our current implementation references bearerTokenFile and tlsConfig.caFile using absolute filesystem paths. This approach is no longer permitted, as Prometheus now prohibits direct filesystem access for these files. As a result, the Prometheus Operator logs show errors when it attempts to access these paths.
Have you updated the necessary documentation?

  • Documentation update is required by this PR.
  • Documentation has been updated.

Which issue(s) this PR fixes:
https://issues.redhat.com/browse/GITOPS-7992
Fixes #?
https://issues.redhat.com/browse/GITOPS-7992
Test acceptance criteria:

  • Unit Test
  • E2E Test

How to test changes / Special notes to the reviewer:

  • install gitops operator on oc cluster

  • make this change in cluster-monitoring-configmap like below

kind: ConfigMap
apiVersion: v1
metadata:
  name: cluster-monitoring-config
  namespace: openshift-monitoring
  uid: 8d390161-acc1-4409-809d-638359caeb40
  resourceVersion: '1966303'
  creationTimestamp: '2025-11-08T20:14:19Z'
  annotations:
    kubectl.kubernetes.io/last-applied-configuration: |
      {"apiVersion":"v1","data":{"config.yaml":"prometheusK8s:\n  retention: 3d\n"},"kind":"ConfigMap","metadata":{"annotations":{},"name":"cluster-monitoring-config","namespace":"openshift-monitoring"}}
  managedFields:
    - manager: kubectl-client-side-apply
      operation: Update
      apiVersion: v1
      time: '2025-11-08T20:14:19Z'
      fieldsType: FieldsV1
      fieldsV1:
        'f:data': {}
        'f:metadata':
          'f:annotations':
            .: {}
            'f:kubectl.kubernetes.io/last-applied-configuration': {}
    - manager: Mozilla
      operation: Update
      apiVersion: v1
      time: '2025-11-13T08:48:04Z'
      fieldsType: FieldsV1
      fieldsV1:
        'f:data':
          'f:config.yaml': {}
data:
  config.yaml: |
    enableUserWorkload: true
    prometheusK8s:
      retention: 3d
  • check prometheus operator pod logs using command "oc logs -f prometheus-operator-b6ccc8c9d-s86q4 -n openshift-user-workload-monitoring"

…mpting to use a bearerTokenFile configuration in its endpoints definition

Signed-off-by: akhil nittala <nakhil@redhat.com>
@openshift-ci
Copy link

openshift-ci bot commented Nov 13, 2025

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 openshift-ci bot added the kind/bug Something isn't working label Nov 13, 2025
@openshift-ci
Copy link

openshift-ci bot commented Nov 13, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jgwest for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

…mpting to use a bearerTokenFile configuration in its endpoints definition

Signed-off-by: akhil nittala <nakhil@redhat.com>
@akhilnittala akhilnittala marked this pull request as ready for review November 16, 2025 17:51
@openshift-ci openshift-ci bot requested review from jgwest and trdoyle81 November 16, 2025 17:52
…mpting to use a bearerTokenFile configuration in its endpoints definition

Signed-off-by: akhil nittala <nakhil@redhat.com>
…mpting to use a bearerTokenFile configuration in its endpoints definition

Signed-off-by: akhil nittala <nakhil@redhat.com>
…mpting to use a bearerTokenFile configuration in its endpoints definition

Signed-off-by: akhil nittala <nakhil@redhat.com>
@svghadi
Copy link
Member

svghadi commented Nov 17, 2025

/retest

@akhilnittala
Copy link
Contributor Author

/retest-required

…mpting to use a bearerTokenFile configuration in its endpoints definition

Signed-off-by: akhil nittala <nakhil@redhat.com>
Copy link
Member

@anandf anandf left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants