Pages namespace in path configuration
What does this MR do?
Pages namespace in path configuration
Note: When namespace in the path is disabled, the original behaviour is unchanged and will remain so in the future. This feature is only for customers who has a requirement to remove the wildcard certificate.
Test Plan:
-
Generate a TLS certificate for a non-wildcard Pages URL.
-
Create a secret (e.g.,
tls-star-pages
) with the generated full certificate chain and private key.kubectl create secret tls tls-star-pages --cert=/path/to/fullchain.pem --key=/path/to/privkey.pem
-
Update
values.yaml
:pages: enabled: true accessControl: true host: <your pages host> namespaceInPath: true
-
Add the created TLS secret under
ingress
incharts/gitlab/charts/gitlab-pages/values.yaml
:ingress: tls: secretName: tls-star-pages
-
To test this change with the ongoing GitLab Pages MR that supports namespace in path, update the
image
in yourcharts/gitlab/charts/gitlab-pages/values.yaml
image: repository: registry.gitlab.com/gitlab-org/build/cng/gitlab-pages tag: ngala-master-patch-25792
Note: The image is generated using CNG draft MR.
-
Install your GitLab Helm chart.
Public Project:
-
Log in to the deployed GitLab instance.
-
Create a plain HTML public Pages project from the template: GitLab Pages New Project Template
-
When the pipeline is finished, go to
Deploy
>Pages
to find the link to your Pages website. -
Verify that the URL schema contains the namespace in the page. Example:
https://<PAGES_URL>/<NAMESPACE>/<PROJECT_NAME>
-
Verify that the URL works and it loads the generated Pages site.
Private Project:
-
Log in to the deployed GitLab instance.
-
Create a plain HTML private Pages project from the template: GitLab Pages New Project Template
-
When the pipeline is finished, go to
Deploy
>Pages
to find the link to your Pages website. -
Verify that the URL schema contains the namespace in the page. Example:
https://<PAGES_URL>/<NAMESPACE>/<PROJECT_NAME>
-
On visiting the generated Pages site, verify that it follows the auth flow.
-
After login, if you get an auth URL error, go to your GitLab instance > Search or go to > Admin Area > Applications. Edit the GitLab Pages application and update the URL to include the namespace in the path. Example (for Pages URL
pages.example.io
):https://projects.pages.example.io/auth
will becomehttps://pages.example.io/projects/auth
-
Save the application.
-
Now, try to visit the deployed Pages URL again. Authentication should happen, and it should load the generated Pages site.
Changelog: added
Related issues
Charts configuration - Pages without DNS wildca... (#5570 - closed)
Author checklist
For general guidance, please follow our Contributing guide.
Required
For anything in this list which will not be completed, please provide a reason in the MR discussion.
-
Merge Request Title and Description are up to date, accurate, and descriptive. -
MR targeting the appropriate branch. -
MR has a green pipeline. -
Documentation created/updated. -
Tests added/updated, and test plan for scenarios not covered by automated tests. -
Equivalent MR/issue for omnibus-gitlab opened.
Reviewers checklist
-
MR has a green pipeline on https://gitlab.com/gitlab-org/charts/gitlab. -
Consider downstream impact to the Operator, as per evaluating impact from changes to GitLab Chart.