Skip to content

[installer, ws-manager]: Use installation shortname in URL templates #10127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 19, 2022

Conversation

andrew-farries
Copy link
Contributor

Description

As described in #9875, failing image builds currently fail to produce any useful output. A possible cause, as described in this comment, is that the format of the ws-manager WorkspaceURLTemplate strings is wrong.

When we deployed with the old helm chart, these values were set in the relevant configmap like this:

"urlTemplate": "https://{{"{{ .Prefix }}"}}.ws{{- if $.Values.installation.shortname -}}-{{ $.Values.installation.shortname }}{{- end -}}.{{ $.Values.hostname }}",
"portUrlTemplate": "https://{{"{{ .WorkspacePort }}"}}-{{"{{ .Prefix }}"}}.ws{{- if $.Values.installation.shortname -}}-{{ $.Values.installation.shortname }}{{- end -}}.{{ $.Values.hostname }}",

ie, they included a suffix after the ws.

This PR tailors the installer output to produce these URLs in the same way the old helm chart did. Installation short name suffixes like eu-02 are set here:

https://github.com/gitpod-io/ops/blob/main/deploy/production/meta-eu02/app/installer-config.yaml#L6

so the URLs will now look like https://{{ .Prefix }}.ws-eu02.example.com.

Related Issue(s)

Fixes #9875

How to test

I've tested this change in staging by editing the ws-manager configmap in staging to contain the correct URLs, restarting ws-manager and running an image build. I was able to see image build logs as expected:

image

Release Notes

[installer] Use installation shortname when constructing ws-manager URL templates

Documentation

None

@andrew-farries andrew-farries requested a review from a team May 19, 2022 12:44
@github-actions github-actions bot added the team: workspace Issue belongs to the Workspace team label May 19, 2022
@roboquat roboquat merged commit 73502c0 into main May 19, 2022
@roboquat roboquat deleted the af/installer-append-shortname-to-url-templates branch May 19, 2022 20:07
@sagor999
Copy link
Contributor

@andrew-farries I think this change broke preview env.
https://gitpod.slack.com/archives/C032A46PWR0/p1652996871215559

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: workspace Workspace team change is running in production deployed Change is completely running in production release-note size/M team: workspace Issue belongs to the Workspace team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: headless task failed, on imagebuild
3 participants