Skip to content

Commit 75645af

Browse files
authored
deploy: feat: set Grafana root_url to make oauth flow smoother (#344)
## Motivation and Context Ensures that the redirect url is set properly when logging in with Google ## How Has This Been Tested? In staging ## Breaking Changes None ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [x] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update
1 parent fbd385b commit 75645af

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

deploy/pkg/k8s/monitoring.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ func deployGrafana(ctx *pulumi.Context, cluster *providers.ProviderInfo, ns *cor
178178
}
179179

180180
// Deploy Grafana
181+
grafanaHost := "grafana." + environment + ".registry.modelcontextprotocol.io"
181182
_, err = helm.NewChart(ctx, "grafana", helm.ChartArgs{
182183
Chart: pulumi.String("grafana"),
183184
Version: pulumi.String("9.4.4"),
@@ -195,6 +196,9 @@ func deployGrafana(ctx *pulumi.Context, cluster *providers.ProviderInfo, ns *cor
195196
},
196197
},
197198
"grafana.ini": pulumi.Map{
199+
"server": pulumi.Map{
200+
"root_url": pulumi.String("https://" + grafanaHost),
201+
},
198202
"auth": pulumi.Map{
199203
"disable_login_form": pulumi.Bool(true),
200204
},
@@ -276,8 +280,6 @@ func deployGrafana(ctx *pulumi.Context, cluster *providers.ProviderInfo, ns *cor
276280
}
277281

278282
// Create ingress for external access
279-
grafanaHost := "grafana." + environment + ".registry.modelcontextprotocol.io"
280-
281283
_, err = networkingv1.NewIngress(ctx, "grafana-ingress", &networkingv1.IngressArgs{
282284
Metadata: &metav1.ObjectMetaArgs{
283285
Name: pulumi.String("grafana-ingress"),

0 commit comments

Comments
 (0)