Skip to content

Commit 1ad6979

Browse files
authored
feat(tfroot-runner): bump tooling; replace oc with kubectl; drop OpenShift import workflow (#2)
## Summary - Bump every pinned tool in `tfroot-runner/Containerfile` to current latest: | Tool | Old | New | |---|---|---| | terraform-docs | 0.21.0 | **0.22.0** | | opentofu | 1.11.5 | 1.11.6 | | sops | 3.11.0 | 3.12.2 | | tflint | 0.61.0 | 0.62.0 | | tfupdate | 0.9.1 | 0.9.3 | | infracost | 0.10.43 | 0.10.44 | | checkov | 3.2.504 | 3.2.525 | | pre-commit | 4.5.1 | 4.6.0 | | conventional-pre-commit (hook) | v4.3.0 | v4.4.0 | - The **terraform-docs 0.21.0 → 0.22.0** bump fixes a months-long local-vs-CI divergence (Homebrew shipped v0.22.0; CI image stuck at v0.21.0 → README markdown tables regenerated in different formats locally vs in CI). - **Drop `oc` (OpenShift CLI) + `gcompat`** (alpine package, only needed for oc's glibc linking) — OpenShift Local is gone from the stack. - **Add `kubectl 1.36.0`** as the replacement; the new PostSync hooks in kustomize-cluster (`wait-for-crds`, `wait-for-repo-server`, `ci-token-sync`) use kubectl directly. - **Delete `.github/workflows/pull.yml`** — this workflow imported each built image into OpenShift's internal registry at `image-registry.openshift-image-registry.svc:5000/public-registry/<image>:latest`. With CRC retired and consumers (CI workflows in tfroot-libvirt and kustomize-cluster) already pulling directly from `ghcr.io/makeitworkcloud/...:latest`, the import is dead code. Bundles the previously-staged repo-local opencode config (the prior commit on this branch). ## Test plan - [x] `pre-commit` runs clean locally (hadolint not installed locally; CI's `Build` workflow runs hadolint via the buildah job) - [ ] CI `Build` job passes on PR (rebuilds image without push) - [x] On merge: `Build` workflow rebuilds and pushes new `tfroot-runner:latest` to `ghcr.io/makeitworkcloud` - [ ] After merge: re-running CI on tfroot-libvirt PR #2 and any other tfroot-* repo will use the new image with terraform-docs v0.22.0, fixing the README format drift
1 parent 27e5a3b commit 1ad6979

4 files changed

Lines changed: 51 additions & 69 deletions

File tree

.github/workflows/pull.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

opencode.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"$schema": "https://opencode.ai/config.json",
3+
"mcp": {
4+
"agent-hub": {"type": "local", "command": ["npx", "-y", "agent-hub-mcp@latest"], "enabled": true},
5+
"context-mode": {"type": "local", "command": ["context-mode"], "enabled": true},
6+
"context7": {"type": "remote", "url": "https://mcp.context7.com/mcp", "enabled": true},
7+
"github": {"type": "remote", "url": "https://api.githubcopilot.com/mcp/", "enabled": true, "headers": {"Authorization": "Bearer {env:GITHUB_TOKEN}"}},
8+
"opencode-docs": {"enabled": false},
9+
"opentofu-docs": {"enabled": false},
10+
"aws-docs": {"enabled": false},
11+
"kubernetes": {"enabled": false},
12+
"tmux": {"enabled": false},
13+
"linear": {"enabled": false},
14+
"notion": {"enabled": false},
15+
"aws-api-staging": {"enabled": false},
16+
"aws-api-prod": {"enabled": false},
17+
"grafana": {"enabled": false},
18+
"terraform-docs": {"enabled": false},
19+
"argocd-staging-eks": {"enabled": false},
20+
"argocd-prod-eks": {"enabled": false}
21+
},
22+
"tools": {
23+
"opencode-docs_*": false,
24+
"opentofu-docs_*": false,
25+
"aws-docs_*": false,
26+
"kubernetes_*": false,
27+
"tmux_*": false,
28+
"linear_*": false,
29+
"notion_*": false,
30+
"aws-api-staging_*": false,
31+
"aws-api-prod_*": false,
32+
"grafana_*": false,
33+
"terraform-docs_*": false,
34+
"argocd-staging-eks_*": false,
35+
"argocd-prod-eks_*": false
36+
}
37+
}

tfroot-runner/Containerfile

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ RUN apk add --no-cache \
77
build-base libffi-dev git
88

99
# Install Python packages that need compilation
10-
ARG CHECKOV_VERSION=3.2.504
11-
ARG PRECOMMIT_VERSION=4.5.1
10+
ARG CHECKOV_VERSION=3.2.525
11+
ARG PRECOMMIT_VERSION=4.6.0
1212
RUN pip install --no-cache-dir --break-system-packages --root=/install --prefix=/usr \
1313
pre-commit==${PRECOMMIT_VERSION} checkov==${CHECKOV_VERSION}
1414

@@ -20,7 +20,6 @@ LABEL description="Alpine-based IaC runner for OpenTofu/Terraform on AMD64 archi
2020
# Install runtime dependencies
2121
# cdrkit provides genisoimage equivalent (mkisofs)
2222
# binutils provides strip for binary size reduction
23-
# gcompat provides glibc compatibility for oc binary
2423
# hadolint ignore=DL3018
2524
RUN apk add --no-cache \
2625
curl unzip gnupg \
@@ -32,20 +31,20 @@ RUN apk add --no-cache \
3231
cdrkit \
3332
bash \
3433
binutils \
35-
gcompat \
3634
make
3735

3836
# Copy Python packages from builder
3937
COPY --from=builder /install /
4038

4139
# Tool versions
42-
ARG OPENTOFU_VERSION=1.11.5
43-
ARG SOPS_VERSION=3.11.0
44-
ARG TERRAFORM_DOCS_VERSION=0.21.0
45-
ARG TFUPDATE_VERSION=0.9.1
40+
ARG OPENTOFU_VERSION=1.11.6
41+
ARG SOPS_VERSION=3.12.2
42+
ARG TERRAFORM_DOCS_VERSION=0.22.0
43+
ARG TFUPDATE_VERSION=0.9.3
4644
ARG HCLEDIT_VERSION=0.2.17
47-
ARG TFLINT_VERSION=0.61.0
48-
ARG INFRACOST_VERSION=0.10.43
45+
ARG TFLINT_VERSION=0.62.0
46+
ARG INFRACOST_VERSION=0.10.44
47+
ARG KUBECTL_VERSION=1.36.0
4948

5049
# Install all binary tools in a single layer, strip debug symbols, clean up
5150
# hadolint ignore=DL3003,DL4006
@@ -57,9 +56,9 @@ RUN set -eux; \
5756
# OpenTofu (and symlink as terraform)
5857
curl --proto '=https' --tlsv1.2 -fsSL https://get.opentofu.org/install-opentofu.sh | sh -s -- --install-method standalone --opentofu-version "${OPENTOFU_VERSION}"; \
5958
ln -s /usr/local/bin/tofu /usr/local/bin/terraform; \
60-
# OpenShift CLI
61-
curl -L https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz | tar xz -C /usr/local/bin oc; \
62-
chmod +x /usr/local/bin/oc; \
59+
# kubectl
60+
curl -fsSL "https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl" -o /usr/local/bin/kubectl; \
61+
chmod +x /usr/local/bin/kubectl; \
6362
# Kustomize (script outputs to current directory)
6463
cd /tmp && curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash; \
6564
mv /tmp/kustomize /usr/local/bin/; \
@@ -82,7 +81,7 @@ RUN set -eux; \
8281
# Strip debug symbols from all Go/Rust binaries
8382
strip /usr/local/bin/sops \
8483
/usr/local/bin/tofu \
85-
/usr/local/bin/oc \
84+
/usr/local/bin/kubectl \
8685
/usr/local/bin/kustomize \
8786
/usr/local/bin/terraform-docs \
8887
/usr/local/bin/tfupdate \

tfroot-runner/pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# To update hooks for all tfroot repos, modify this file and rebuild the image.
66
repos:
77
- repo: https://github.com/compilerla/conventional-pre-commit
8-
rev: v4.3.0
8+
rev: v4.4.0
99
hooks:
1010
- id: conventional-pre-commit
1111
stages: [commit-msg]

0 commit comments

Comments
 (0)