Skip to content

Pages namespace in path configuration

Naman Jagdish Gala requested to merge ngala/pages-namespace-in-path into master

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:

  1. Generate a TLS certificate for a non-wildcard Pages URL.

  2. 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
  3. Update values.yaml:

    pages:
      enabled: true
      accessControl: true
      host: <your pages host>
      namespaceInPath: true
  4. Add the created TLS secret under ingress in charts/gitlab/charts/gitlab-pages/values.yaml:

    ingress:
      tls:
        secretName: tls-star-pages
  5. To test this change with the ongoing GitLab Pages MR that supports namespace in path, update the image in your charts/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.

  6. Install your GitLab Helm chart.

Public Project:

  1. Log in to the deployed GitLab instance.

  2. Create a plain HTML public Pages project from the template: GitLab Pages New Project Template

  3. When the pipeline is finished, go to Deploy > Pages to find the link to your Pages website.

  4. Verify that the URL schema contains the namespace in the page. Example:

    https://<PAGES_URL>/<NAMESPACE>/<PROJECT_NAME>
  5. Verify that the URL works and it loads the generated Pages site.

Private Project:

  1. Log in to the deployed GitLab instance.

  2. Create a plain HTML private Pages project from the template: GitLab Pages New Project Template

  3. When the pipeline is finished, go to Deploy > Pages to find the link to your Pages website.

  4. Verify that the URL schema contains the namespace in the page. Example:

    https://<PAGES_URL>/<NAMESPACE>/<PROJECT_NAME>
  5. On visiting the generated Pages site, verify that it follows the auth flow.

  6. 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 become https://pages.example.io/projects/auth

  7. Save the application.

  8. 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

Edited by Clemens Beck

Merge request reports

Loading