airbytehq / airbytehq/airbyte

Helm Chart V2: RoleBinding missing namespace in subjects causes 401 Unauthorized

Abierto
#73,266 3 comentarios 1 reacción 0 asignados Ver en GitHub
area/platform autoteam community needs-triage team/compose team/platform-move type/bug
Lenguaje dominante
Python
Estrellas
22.1k
Forks
5.4k
Merge medio
5 h
PR fusionados (30 d)
671

Descripción

### Helm Chart Version

2.0.19 (appVersion 2.0.0)

### What step the error happened?

Upgrading the Platform or Helm Chart

### Relevant information

The `serviceaccount.yaml` template creates a RoleBinding without specifying `namespace` in the `subjects[]` array. This causes 401 Unauthorized errors when pods try to use the ServiceAccount after RBAC resources are recreated (e.g., during upgrades or when namespace labels change via Terraform).

**Current code** in `templates/serviceaccount.yaml` (line 43-45):

```yaml
subjects:
- kind: ServiceAccount
name: {{ include "airbyte.serviceAccountName" . }}
```

**Fix** - add `namespace`:

```yaml
subjects:
- kind: ServiceAccount
name: {{ include "airbyte.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
```

**Steps to reproduce:**

1. Deploy Airbyte with Helm Chart V2 (2.0.19) on GKE
2. Trigger RBAC recreation (e.g., Terraform apply that modifies namespace labels, or Helm upgrade)
3. Observe workload-launcher pod logs showing 401 Unauthorized when listing/creating pods

**Workaround:** Adding `namespace: {{ .Release.Namespace }}` to subjects and restarting affected pods resolves the issue.

**Environment:**

- Kubernetes: GKE 1.33
- Helm Chart: V2 2.0.19
- Airbyte: 2.0.0 (community edition)
- Deployment method: Kustomize + ArgoCD

### Relevant log output

```shell
io.fabric8.kubernetes.client.KubernetesClientException:
Failure executing: GET at: https://kubernetes.default.svc/api/v1/namespaces/airbyte/pods
Message: Unauthorized
```

---
**Internal Tracking:** https://github.com/airbytehq/oncall/issues/11238

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.