refactor: Atualizar CLAUDE.md e melhorias aula-11

- CLAUDE.md: Atualizar tabela com aulas 12 (Victoria Metrics) e 13 (Container Factory)
- aula-11: Melhorias no setup do GitLab Runner
This commit is contained in:
ArgoCD Setup
2026-01-08 18:30:08 -03:00
parent 5f6f99843a
commit 97b4b50c96
4 changed files with 99 additions and 5 deletions

View File

@@ -216,6 +216,39 @@ Alternativas (mais seguras, mas mais complexas):
- **Kaniko**: Build sem Docker daemon
- **Buildah**: Build rootless
### Requisitos para Docker-in-Docker
#### 1. Pod Security (Kubernetes 1.25+)
Kubernetes 1.25+ aplica Pod Security Admission por padrão. O namespace `gitlab`
precisa permitir pods privilegiados:
```bash
kubectl label namespace gitlab \
pod-security.kubernetes.io/enforce=privileged \
pod-security.kubernetes.io/warn=privileged \
--overwrite
```
> **Nota**: O `setup.sh` já configura isso automaticamente.
#### 2. Helper Image para ARM64
Em clusters com nodes ARM64 (como Hetzner CAX), o runner precisa usar
o helper image correto. Configure em `gitlab-runner-values.yaml`:
```toml
# Dentro de runners.config
[[runners]]
[runners.kubernetes]
helper_image = "gitlab/gitlab-runner-helper:arm64-latest"
```
Sem isso, você verá erros como:
```
no match for platform in manifest: not found
```
## Troubleshooting
### ArgoCD não sincroniza
@@ -254,6 +287,42 @@ kubectl get pods -n gitlab
kubectl logs -n gitlab runner-xxxxx-project-xxx-concurrent-xxx
```
### Erro "violates PodSecurity"
```
violates PodSecurity "baseline:latest": privileged
(containers must not set securityContext.privileged=true)
```
**Solução**: Configure o namespace para permitir pods privilegiados:
```bash
kubectl label namespace gitlab \
pod-security.kubernetes.io/enforce=privileged \
--overwrite
```
### Erro "no match for platform in manifest"
```
image pull failed: no match for platform in manifest: not found
```
**Causa**: O runner está tentando usar imagem x86_64 em node ARM64.
**Solução**: Configure o helper image ARM64 no `gitlab-runner-values.yaml`:
```toml
[[runners]]
[runners.kubernetes]
helper_image = "gitlab/gitlab-runner-helper:arm64-latest"
```
Depois faça upgrade do runner:
```bash
helm upgrade gitlab-runner gitlab/gitlab-runner \
-n gitlab --reuse-values \
-f gitlab-runner-values.yaml
```
### Erro SSH ao conectar repositório
```bash