blumeops/containers/kubectl/Dockerfile
Erich Blume b3747f6c95
All checks were successful
Build Container / build (push) Successful in 8s
Tier 1 version bumps (#186)
## Summary

Audit and upgrade of all deployed images, helm charts, and custom container Dockerfiles to latest stable versions. This PR covers Tier 1 (low-risk minor/patch bumps only).

### Upstream images
| Image | Old | New |
|-------|-----|-----|
| kube-state-metrics | v2.13.0 | v2.18.0 |
| prometheus | v3.2.1 | v3.9.1 |
| loki | 3.3.2 | 3.6.5 |
| alloy | v1.5.1 | v1.13.1 |
| tailscale (proxy + operator) | v1.92.5 | v1.94.1 |
| navidrome | :latest | v0.60.3 (pinned) |

### Helm charts
| Chart | Old | New |
|-------|-----|-----|
| CloudNativePG | v0.27.0 | v0.27.1 |
| 1Password Connect | 2.2.1 | 2.3.0 |

### Custom containers (Dockerfiles updated, images not yet tagged)
| Container | Changes | New tag |
|-----------|---------|---------|
| miniflux | 2.2.16→2.2.17 (security), alpine 3.22 | v1.1.0 |
| kubectl | v1.34.1→v1.34.4, alpine 3.22 | v1.1.0 |
| kiwix-serve | alpine 3.22 | v1.1.0 |
| nettest | alpine 3.22 | v0.14.0 |
| transmission | alpine 3.22, pkg 4.0.6-r4 | v1.1.0 |

All custom containers verified with local `dagger call build`.

### Deferred to Tier 2 (separate PRs)
- Forgejo runner 6→12 (major version scheme change)
- Docker DinD 27→29
- Grafana chart 8→11 (repo migration)
- External Secrets 1→2 (breaking changes)
- Python 3.12→3.13, Elixir 1.18→1.19, Node 22→24
- Transmission 4.0.6→4.1.0 (not in Alpine yet)

## Deployment

After merge:
1. Tag custom containers: `mise run container-tag-and-release <name> <version>` for each
2. Wait for CI builds to complete
3. `argocd app sync apps` then sync individual apps, or let ArgoCD auto-detect

Reviewed-on: https://forge.ops.eblu.me/eblume/blumeops/pulls/186
2026-02-13 17:16:37 -08:00

36 lines
1 KiB
Docker

# Minimal kubectl container
# Multi-arch build: downloads correct binary for target platform
FROM alpine:3.22 AS downloader
ARG TARGETARCH
ARG KUBECTL_VERSION=v1.34.4
RUN apk add --no-cache curl && \
# Detect architecture - use TARGETARCH if set, otherwise detect from uname
if [ -n "$TARGETARCH" ]; then \
ARCH="$TARGETARCH"; \
else \
UNAME_ARCH=$(uname -m); \
case "$UNAME_ARCH" in \
aarch64|arm64) ARCH="arm64" ;; \
x86_64) ARCH="amd64" ;; \
*) echo "Unsupported architecture: $UNAME_ARCH"; exit 1 ;; \
esac; \
fi && \
echo "Downloading kubectl for $ARCH..." && \
curl -LO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/${ARCH}/kubectl" && \
chmod +x kubectl
FROM alpine:3.22
COPY --from=downloader /kubectl /usr/local/bin/kubectl
# Add ca-certificates for HTTPS connections and bash for scripts
RUN apk add --no-cache ca-certificates bash
# Run as non-root
RUN adduser -D -u 1000 kubectl
USER kubectl
ENTRYPOINT ["kubectl"]