OCPBUGS-70352: handled dynamic secret for remote alertmanager#567
OCPBUGS-70352: handled dynamic secret for remote alertmanager#567mvazquezc wants to merge 1 commit intoopenshift-kni:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mvazquezc The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @mvazquezc. Thanks for your PR. I'm waiting for a openshift-kni member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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-sigs/prow repository. |
| bearerToken: | ||
| key: token | ||
| name: observability-alertmanager-accessor | ||
| name: {{ if (lookup "v1" "Namespace" "" "open-cluster-management-addon-observability") }}{{ (regexFind "hub-cluster-id(.*)" ((fromSecret "open-cluster-management-addon-observability" "hub-info-secret" "hub-info.yaml") | base64dec)) | replace "hub-cluster-id: " "observability-alertmanager-accessor-" }}{{ else }}observability-alertmanager-accessor{{ end }} |
There was a problem hiding this comment.
Is it possible to do a quick test on acm 2.14 that things are in order?
I'm curious what happens to this regexFind "hub-cluster-id(.*)" when its not available in the hub-info-secret in acm-2.14.
Does it go to the else block or return an empty string, making a secret name observability-alertmanager-accessor- which would be incorrect
There was a problem hiding this comment.
Will test on 2.14 and report back results.
|
This has been validated in 2.14 and 2.15. 2.14 oc --kubeconfig abi -n openshift-monitoring get cm cluster-monitoring-config -o yaml
apiVersion: v1
data:
config.yaml: |-
alertmanagerMain:
enabled: false
telemeterClient:
enabled: false
nodeExporter:
collectors:
buddyinfo: {}
cpufreq: {}
ksmd: {}
mountstats: {}
netclass: {}
netdev: {}
processes: {}
systemd: {}
tcpstat: {}
prometheusK8s:
additionalAlertmanagerConfigs:
- apiVersion: v2
bearerToken:
key: token
name: observability-alertmanager-accessor
scheme: https
staticConfigs: [alertmanager-open-cluster-management-observability.apps.hub.5g-deployment.lab]
tlsConfig:
ca:
key: service-ca.crt
name: hub-alertmanager-router-ca
insecureSkipVerify: false
externalLabels:
managed_cluster: 304779e6-6785-452b-a61c-670eafc2649c
retention: 24h
kind: ConfigMap
metadata:
annotations:
ran.openshift.io/ztp-deploy-wave: "1"
creationTimestamp: "2026-01-29T12:05:02Z"
name: cluster-monitoring-config
namespace: openshift-monitoring
resourceVersion: "23301"
uid: 03266338-772e-4b84-86be-8bae37b1c2bb2.15 apiVersion: v1
data:
config.yaml: |
alertmanagerMain:
enabled: false
telemeterClient:
enabled: false
nodeExporter:
collectors:
buddyinfo: {}
cpufreq: {}
ksmd: {}
mountstats: {}
netclass: {}
netdev: {}
processes: {}
systemd: {}
tcpstat: {}
prometheusK8s:
additionalAlertmanagerConfigs:
- apiVersion: v2
bearerToken:
key: token
name: observability-alertmanager-accessor-1d70fd5186d445e4883
scheme: https
staticConfigs: [alertmanager-open-cluster-management-observability.apps.hub.5g-deployment.lab]
tlsConfig:
ca:
key: service-ca.crt
name: hub-alertmanager-router-ca-1d70fd5186d445e4883
insecureSkipVerify: false
externalLabels:
managed_cluster: f9be5ddd-3497-42cb-ad10-7159011f3fcb
retention: 24h
kind: ConfigMap
metadata:
annotations:
ran.openshift.io/ztp-deploy-wave: "1"
creationTimestamp: "2026-01-29T14:30:31Z"
name: cluster-monitoring-config
namespace: openshift-monitoring
resourceVersion: "13441"
uid: 587851bd-1a3f-4020-ac90-bfb6f495a28e |
|
/lgtm |
|
Thanks for updating and verifying the fix with 2.14 and 2.15 @mvazquezc |
|
To pass CI, you also need to update this in the kube-compare reference here |
|
We'd also need this same change reciprocated in the Core config, here |
|
/ok-to-test |
| ca: | ||
| key: service-ca.crt | ||
| name: hub-alertmanager-router-ca | ||
| name: (<hub_alertmanager_router_ca>.*) |
Signed-off-by: Mario Vazquez <mavazque@redhat.com>
|
@mvazquezc: This pull request references Jira Issue OCPBUGS-70352, which is invalid:
Comment The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this: 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. |
|
/jira refresh |
|
@abraham2512: This pull request references Jira Issue OCPBUGS-70352, which is valid. The bug has been moved to the POST state. 3 validation(s) were run on this bug
DetailsIn response to this:
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. |
|
/cc @irinamihai @imiller0 |
|
/lgtm |
No description provided.