Skip to content

Commit

Permalink
mage:alertmanager: Expose oauth proxy port (#721)
Browse files Browse the repository at this point in the history
  • Loading branch information
philipgough authored Jan 17, 2025
1 parent d3f30bc commit 7bee8d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions magefiles/alertmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ func alertmanagerPostProcess(manifests []runtime.Object, namespace string) encod
postProcessServiceMonitor(kghelpers.GetObject[*monv1.ServiceMonitor](manifests, ""), namespace)
service := kghelpers.GetObject[*corev1.Service](manifests, alertManagerName)
service.ObjectMeta.Annotations[servingCertSecretNameAnnotation] = alertmanagerTLSSecret
service.Spec.Ports = append(service.Spec.Ports, corev1.ServicePort{
Name: "https",
Port: 8443,
TargetPort: intstr.FromInt32(8443),
})
// Add annotations for openshift oauth so that the route to access the query ui works
serviceAccount := kghelpers.GetObject[*corev1.ServiceAccount](manifests, "")
if serviceAccount.Annotations == nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ objects:
port: 9093
protocol: TCP
targetPort: 9093
- name: https
port: 8443
targetPort: 8443
selector:
app.kubernetes.io/component: alertmanager
app.kubernetes.io/instance: observatorium
Expand Down

0 comments on commit 7bee8d7

Please sign in to comment.