Gitlab-Pages externalHttps Causes CrashLoop in Operator
Summary
When global.pages.externalHttps has a value the controller will crash on Setting controller reference {"gitlab": "gitlab.gitlab-system", "type": "*v1.Service", "reference": "gitlab-system/gitlab-gitlab-pages-custom-domains"}
Steps to reproduce
Setting any ip address in externalHttps[], will cause the controller to fail and crash loop.
spec:
chart:
values:
global:
pages:
enabled: true
externalHttps:
- 10.0.0.1
Configuration used
spec:
chart:
values:
global:
pages:
enabled: true
externalHttps:
- 10.0.0.1
Current behavior
Operator fails and crashloops.
Expected behavior
Operator should be able to support , and not crash when externalHttps is set.
Versions
- Operator: 0.8.1
- Platform:
- Cloud: Openstack
- Kubernetes: (
kubectl version)- Client: v1.24.0
- Server: v1.23.7
Relevant logs
gitlabctl.PagesService(template) should be gitlabctl.PagesDomainsService(template) according to pkg.go.dev/github.com/xanzy/go-gitlab
goroutine 440 [running]: sigs.k8s.io/controller-runtime/pkg/client.ObjectKeyFromObject(0x0, 0x0, 0x49, 0xc003f960e0, 0x2, 0x2) /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.10.1/pkg/client/interfaces.go:35 +0x22 gitlab.com/gitlab-org/cloud-native/gitlab-operator/controllers.(*GitLabReconciler).createOrPatch(0xc001cc6040, 0x22bfc88, 0xc002816420, 0x0, 0x0, 0x22dcb48, 0xc002816fc0, 0x1, 0x0, 0x0) /workspace/controllers/gitlab_controller.go:559 +0x5f gitlab.com/gitlab-org/cloud-native/gitlab-operator/controllers.(*GitLabReconciler).reconcilePagesService(0xc001cc6040, 0x22bfc88, 0xc002816420, 0x22dcb48, 0xc002816fc0, 0x22da188, 0xc00439c5a0, 0x0, 0x0) /workspace/controllers/pages.go:67 +0x8c gitlab.com/gitlab-org/cloud-native/gitlab-operator/controllers.(*GitLabReconciler).reconcilePages(0xc001cc6040, 0x22bfc88, 0xc002816420, 0x22dcb48, 0xc002816fc0, 0x22da188, 0xc00439c5a0, 0x0, 0x0) /workspace/controllers/pages.go:23 +0x1a5 gitlab.com/gitlab-org/cloud-native/gitlab-operator/controllers.(*GitLabReconciler).Reconcile(0xc001cc6040, 0x22bfc88, 0xc002816420, 0xc001890a80, 0xd, 0xc001890b10, 0x6, 0xc002816420, 0xc002816390, 0xc001871db0, ...) /workspace/controllers/gitlab_controller.go:237 +0x1e98 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Reconcile(0xc001dc41e0, 0x22bfc88, 0xc002816390, 0xc001890a80, 0xd, 0xc001890b10, 0x6, 0xc002816300, 0x0, 0x0, ...) /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.10.1/pkg/internal/controller/controller.go:114 +0x247 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc001dc41e0, 0x22bfbe0, 0xc0006260c0, 0x1dfefa0, 0xc0020ab240) /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.10.1/pkg/internal/controller/controller.go:311 +0x305 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc001dc41e0, 0x22bfbe0, 0xc0006260c0, 0x20edb00) /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.10.1/pkg/internal/controller/controller.go:266 +0x205 sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2(0xc0020b4790, 0xc001dc41e0, 0x22bfbe0, 0xc0006260c0) /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.10.1/pkg/internal/controller/controller.go:227 +0x6b created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2 /go/pkg/mod/sigs.k8s.io/controller-runtime@v0.10.1/pkg/internal/controller/controller.go:223 +0x425