I installed GitLab-CE using the official Helm chart in a Google Cloud Kubernetes environment. The service is running, and I can access the GitLab login page at the configured domain. However, the static files (CSS and JS) required for proper rendering of the page are not loading unless I log in. The browser’s network console shows that requests to assets like application.css
are being redirected to /users/sign_in
.
I would like to configure GitLab to allow static files (e.g., CSS and JS) to load without requiring authentication. Here’s what I’ve tried so far:
- Ensured that the
public_enabled
setting is true viavalues.yaml
:
yaml
Copiar código
global:
appConfig:
publicEnabled: true
restrictedVisibilityLevels: []
- Tested access to static files inside the pod using
curl
:
bash
Copiar código
curl -I http://localhost:8080/assets/application.css
This results in a 302 Found
redirect to /users/sign_in
.
3. Attempted to update settings via gitlab-rails console
in the gitlab-toolbox
pod:
ruby
Copiar código
ApplicationSetting.current.update!(public_enabled: true)
ApplicationSetting.current.update!(restricted_visibility_levels: [])
Rails.cache.clear
Despite these steps, the static files are still not accessible without logging in.
Questions:
- Is there any additional configuration needed in the Helm
values.yaml
file or elsewhere to allow public access to static files? - Could this issue be related to how Ingress or NGINX is configured in my Kubernetes environment? If so, what specific annotations or settings should I use?
- Are there other GitLab settings or steps I might have missed to resolve this issue?
Any help or guidance would be greatly appreciated! Thank you!