Skip to content

Commit 32248c3

Browse files
committed
telco-ran: get alertmanager url from mcl annotation
1 parent a39b47a commit 32248c3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

telco-core/configuration/reference-crs/optional/other/monitoring-config-cm.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ data:
2727
name: observability-alertmanager-accessor
2828
scheme: https
2929
staticConfigs:
30-
- {{ if (lookup "v1" "Namespace" "" "open-cluster-management-addon-observability") }}{{ (regexFind "alertmanager-endpoint(.*)" ((fromSecret "open-cluster-management-addon-observability" "hub-info-secret" "hub-info.yaml") | base64dec)) | replace "alertmanager-endpoint: https://" "" }}{{ end }}
30+
- {{ if (lookup "v1" "Namespace" "" "open-cluster-management-addon-observability") }}{{hub index (lookup "cluster.open-cluster-management.io/v1" "ManagedCluster" "" .ManagedClusterName).metadata.annotations "acm-alertmanager-route" hub}}{{ end }}
3131
tlsConfig:
3232
ca:
3333
key: service-ca.crt

telco-ran/configuration/kube-compare-reference/hack/default_value.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ cluster_tuning_monitoring_configuration_ReduceMonitoringFootprint:
331331
- metadata:
332332
name: cluster-monitoring-config
333333
captureGroup_defaults:
334-
alertmanager_endpoint: '{{ `{{ if (lookup "v1" "Namespace" "" "open-cluster-management-addon-observability") }}{{ (regexFind "alertmanager-endpoint(.*)" ((fromSecret "open-cluster-management-addon-observability" "hub-info-secret" "hub-info.yaml") | base64dec)) | replace "alertmanager-endpoint: https://" "" }}{{ end }}` }}'
334+
alertmanager_endpoint: '{{ `{{ if (lookup "v1" "Namespace" "" "open-cluster-management-addon-observability") }}{{hub index (lookup "cluster.open-cluster-management.io/v1" "ManagedCluster" "" .ManagedClusterName).metadata.annotations "acm-alertmanager-route" hub}}{{ end }}` }}'
335335
managed_cluster: '{{ `{{ fromClusterClaim "id.openshift.io" }}` }}'
336336
lca_LcaSubscription:
337337
- spec:

telco-ran/configuration/source-crs/cluster-tuning/monitoring-configuration/ReduceMonitoringFootprint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ data:
3030
name: observability-alertmanager-accessor
3131
scheme: https
3232
staticConfigs:
33-
- {{ if (lookup "v1" "Namespace" "" "open-cluster-management-addon-observability") }}{{ (regexFind "alertmanager-endpoint(.*)" ((fromSecret "open-cluster-management-addon-observability" "hub-info-secret" "hub-info.yaml") | base64dec)) | replace "alertmanager-endpoint: https://" "" }}{{ end }}
33+
- {{ if (lookup "v1" "Namespace" "" "open-cluster-management-addon-observability") }}{{hub index (lookup "cluster.open-cluster-management.io/v1" "ManagedCluster" "" .ManagedClusterName).metadata.annotations "acm-alertmanager-route" hub}}{{ end }}
3434
tlsConfig:
3535
ca:
3636
key: service-ca.crt

0 commit comments

Comments
 (0)