RobotLB detection in cozy-lib reads a key nothing writes, so nodePorts are disabled on every cluster
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 45/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- helm, kubernetes
- Domínio
- infrastructure, networking
Direção de pesquisa
Start with packages/library/cozy-lib/templates/_network.tpl and trace how cozy-lib.network.disableLoadBalancerNodePorts gets its values from _cluster, rendered in packages/core/platform/templates/apps.yaml. Compare the available cluster values with how RobotLB is enabled through bundles.enabledPackages; the issue proposes publishing the active load balancer or detecting its Package. Done means the helper uses a signal that exists in v1.6 and keeps nodePorts enabled for RobotLB services.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
What happens
cozy-lib.network.disableLoadBalancerNodePorts is meant to keep nodePorts allocated when RobotLB is the load balancer, because RobotLB cannot work without them. It never does: on every 1.6 cluster it returns true and nodePorts are switched off, RobotLB or not.
The detection reads a key that nothing writes any more.
packages/library/cozy-lib/templates/_network.tpl:
{{- define "cozy-lib.network.disableLoadBalancerNodePorts" }}
{{- include "cozy-lib.loadCozyConfig" (list "" .) }}
{{- $cozyConfig := index . "cozyConfig" }}
{{- if not $cozyConfig }}
{{- include "cozy-lib.network.defaultDisableLoadBalancerNodePorts" . }}
{{- else }}
{{- $enabledComponents := splitList "," ((index $cozyConfig.data "bundle-enable") | default "") }}
{{- not (has "robotlb" $enabledComponents) }}
{{- end }}
{{- end }}
loadCozyConfig does not load a ConfigMap, it aliases the platform values channel:
{{- $_ := set (index . 1) "cozyConfig" (dict "data" ((index . 1).Values._cluster | default dict)) }}
_cluster is rendered by packages/core/platform/templates/apps.yaml and carries root-host, bundle-name, solver, issuer-name, wildcard-secret-name, the dns01-* keys and so on. It has never carried bundle-enable, which is a 0.x ConfigMap key: git grep bundle-enable across the tree hits only this template, two changelogs and hack/migrate-to-version-1.0.sh. Nothing writes it.
So the else branch evaluates splitList "," "", which is [""], has "robotlb" [""] is false, and the helper returns true. The if not $cozyConfig branch would return true as well. Both paths disable nodePorts unconditionally.
Enabling RobotLB through bundles.enabledPackages as the Hetzner install guide documents has no effect on this, because that list never reaches _cluster under any spelling.
Why it matters
Six shipped applications gate allocateLoadBalancerNodePorts: false on this helper:
packages/apps/http-cache/templates/haproxy/service.yaml
packages/apps/mongodb/templates/external-svc.yaml
packages/apps/postgres/templates/external-svc.yaml
packages/apps/redis/templates/service.yaml
packages/apps/tcp-balancer/templates/service.yaml
packages/apps/vm-instance/templates/service.yaml
On a Hetzner cluster every one of them renders allocateLoadBalancerNodePorts: false, and RobotLB then skips the service: its README states that a port is only reachable through its nodePort, that ports without one are skipped, and that allocateLoadBalancerNodePorts: false is not supported. So exposing Postgres, Redis, MongoDB, a TCP balancer or a VM externally silently produces a Service that never gets an address.
The failure gives the operator nothing to work with. The chart renders, the HelmRelease goes Ready, the Service sits in <pending>, and the RobotLB logs do not mention the service at all, because it was filtered out before anything was attempted.
Suggested fix
The helper needs a signal that exists in 1.6. Two directions:
- Have the platform publish the active load balancer on the
_clusterchannel, the same way it publishessolverandissuer-name, and key the helper off that. It fits the existing mechanism and stays declarative. - Failing that, detect RobotLB from something observable at render time, such as the presence of its Package, rather than from a values key that no longer exists.
Whichever way, the legacy bundle-enable arm should go, or at least stop being the only thing that can return false.
Environment
Cozystack v1.6.4, bare metal on Hetzner, RobotLB enabled through bundles.enabledPackages: [cozystack.hetzner-robotlb] with MetalLB disabled.
- Linguagem predominante
- Go
- Estrelas
- 2.2k
- Forks
- 209
- Merge médio
- 2d 9h
- PRs com merge (30d)
- 130
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de cozystack/cozystack
-
TenantGateway DNS-01 certificate lists a child apex its parent's wildcard covers; Let's Encrypt refuses the orderTalvez já em andamento @somaz94 assumiu há 10 dias. Abertatriage/needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
cozystack/cozystack#5125 · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
docs(release): changelog check B looks for images/*/Dockerfile, which does not existTalvez já em andamento @harshitrwt assumiu há 20 dias. Abertaarea/release kind/bug kind/documentation triage/needs-triage
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
cozystack/cozystack#4892 · 1 comentário · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
triage/needs-triage
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 64/100
cozystack/cozystack#4886 · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
area/testing kind/cleanup priority/backlog triage/needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
cozystack/cozystack#4882 · 1 reação ·
Mantenedores costumam responder em até 1 dia
-
area/storage kind/bug priority/backlog triage/needs-triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
cozystack/cozystack#4878 · 1 reação ·
Mantenedores costumam responder em até 1 dia
Todas as issues de cozystack/cozystack
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
[Bug] K8s reconcile still resets explicit 0 to defaults for response_api, memory and flow stateTalvez já em andamento @Bevisy assumiu hoje. Abertaneeds-acceptance
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 87/100
vllm-project/semantic-router#5998 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
devantler-tech/ksail#8256 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
Mantenedores costumam responder em até 1 dia
-
desktop v3 windows
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
esengine/DeepSeek-Reasonix#15016 · 1 comentário ·
Mantenedores costumam responder em até 1 dia