Please help fill in this template with all the details to help others help you more efficiently. Use formatting blocks for code, config, logs and ensure to remove sensitive data.
Problem to solve
Set up gitlab-pages with custom-domains and openID authentication
I have a self-hosted kubernetes environment with our own company openID flow for some time.
I’ve enabled gitlab pages with success, protected with oauth flow.
The issue is when I enable custom domains.
To have the option with custom domains in the admin area, I have to add to the helm chart:
global:
pages:
...
externalHttp:
- pages.mydomain.local
externalHttps:
- pages.mydomain.local
So, the pages sections:
global:
pages:
enabled: true
accessControl: true
externalHttp:
- pages.mydomain.local
externalHttps:
- pages.mydomain.local
oauth:
gitlab-pages:
secret: openid
appIdKey: clientId
appSecretKey: clientSecret
redirectUri: https://projects.pages.mydomain.local/auth
authScope: ""
Dig the helm chart and when having externalHttp or externalHttps in values.yaml, it doesn’t apply the *.pages.mydomain.local ingress template and the gitlab-stg-gitlab-pages service template. And it’s applied another service called gitlab-stg-gitlab-pages-custom-domains.
This way it is removed the handler for the oauth app, because there is no *.pages.mydomain.local served in projects.pages.mydomain.local
I’ve created a customDomain, and after I removed the externalHttp(s) configuration.
I’ve created manually an ingress and pointed to the gitlab-stg-gitlab-pages service.
Everything works, and I have in the interface the custom Domain I’ve created.
But if I want to create to another project a custom domain I have to do this again…
Is there any solution for this? Is it intended to be like this?
Thanks in advance
Versions
Helm chart 8.6.2
Gitlab v17.6.2