diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 50df512..841ad5c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,3 +5,8 @@ updates: schedule: interval: "weekly" open-pull-requests-limit: 10 + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 10 diff --git a/.github/labeler.yml b/.github/labeler.yml index 4ec0a0b..2fbea4a 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,6 +1,7 @@ documentation: - - ./*.md + - changed-files: + - any-glob-to-any-file: '*.md' ci: - - .dependabot/* - - .github/* + - changed-files: + - any-glob-to-any-file: '.github/**' diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 1d3d171..80e2032 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -10,6 +10,6 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@v4 + - uses: actions/labeler@v7 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 4ff96b3..1dde43b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,14 +3,17 @@ name: Lint Dockerfile on: pull_request: +permissions: + contents: read + jobs: linter: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v7 - name: Lint Dockerfile - uses: hadolint/hadolint-action@master + uses: hadolint/hadolint-action@v3.5.0 with: dockerfile: "Dockerfile" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e4595e4..e38bde2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,34 +7,41 @@ on: - '*' pull_request: +permissions: + contents: read + jobs: push-to-registry: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v7 - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v4 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v4 - name: Log in to Docker Hub - uses: docker/login-action@v2.0.0 + if: github.event_name != 'pull_request' + uses: docker/login-action@v4 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v6 with: - flavor: latest=true - images: ventx/debug-pod + images: hajowieland/debug-pod + tags: | + type=ref,event=pr + type=semver,pattern={{version}} + type=raw,value=edge,enable=${{ github.event_name == 'workflow_dispatch' }} - name: Build and push Docker image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v7 with: context: . platforms: linux/amd64,linux/arm64,linux/arm/v7 @@ -48,17 +55,9 @@ jobs: - name: Sync Docker Hub README if: github.event_name != 'pull_request' - uses: peter-evans/dockerhub-description@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - repository: ventx/debug-pod - - - name: Sync Docker Hub Description - if: github.event_name != 'pull_request' - uses: peter-evans/dockerhub-description@v3 + uses: peter-evans/dockerhub-description@v5 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - repository: ventx/debug-pod + repository: hajowieland/debug-pod short-description: ${{ github.event.repository.description }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b0396f3..ec075f9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,15 +5,15 @@ on: branches: - main +permissions: {} + jobs: release-please: name: release-please runs-on: ubuntu-latest steps: - - uses: google-github-actions/release-please-action@v3 + - uses: googleapis/release-please-action@v5 with: - extra-files: | - README.md - include-v-in-tag: false - release-type: simple + config-file: release-please-config.json + manifest-file: .release-please-manifest.json token: ${{ secrets.PAT_RELEASE_PLEASE }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cf25749 --- /dev/null +++ b/.gitignore @@ -0,0 +1,110 @@ +# IDE +.idea/ + +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# AWS User-specific +.idea/**/aws.xml + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +### macOS template +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b878fc3..534888a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,5 +1,5 @@ repos: - repo: https://github.com/hadolint/hadolint - rev: v2.12.0 + rev: v2.15.1 hooks: - id: hadolint diff --git a/.release-please-manifest.json b/.release-please-manifest.json new file mode 100644 index 0000000..76d5538 --- /dev/null +++ b/.release-please-manifest.json @@ -0,0 +1,3 @@ +{ + ".": "0.9.0" +} diff --git a/CHANGELOG.md b/CHANGELOG.md index e89b961..efa0bda 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## [0.9.0](https://github.com/hajowieland/debug-pod/compare/0.8.0...0.9.0) (2026-08-03) + + +### Features + +* add tcpdump for network debugging ([cdc4c98](https://github.com/hajowieland/debug-pod/commit/cdc4c98cdaed90caa9b8750cd92dce5114a08285)) +* add tcpdump for network debugging ([01020eb](https://github.com/hajowieland/debug-pod/commit/01020eb7294d10f3ad4441b0a088e42678d3d854)) + +## [0.8.0](https://github.com/hajowieland/debug-pod/compare/0.7.0...0.8.0) (2026-07-24) + + +### Features + +* migrate CI to hajowieland org, update base image and all tools ([3f26107](https://github.com/hajowieland/debug-pod/commit/3f2610753b053c0fc295ce0a8c822a4985876462)) + ## [0.7.0](https://github.com/ventx/debug-pod/compare/0.6.0...0.7.0) (2023-06-25) diff --git a/Dockerfile b/Dockerfile index 96f7562..6e57bae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,47 +1,55 @@ -FROM ubuntu:22.04 +FROM ubuntu:26.04 ARG BUILDTIME ARG REVISION ARG TARGETPLATFORM ARG VERSION -LABEL maintainer="Hans Jörg Wieland " \ - org.opencontainers.image.authors="Hans Jörg Wieland " \ - org.opencontainers.image.base.name="ubuntu:22.04" \ +LABEL maintainer="Hans Jörg Wieland " \ + org.opencontainers.image.authors="Hans Jörg Wieland " \ + org.opencontainers.image.base.name="ubuntu:26.04" \ org.opencontainers.image.created="${BUILDTIME}" \ org.opencontainers.image.description="Debug Pod for Kubernetes" \ org.opencontainers.image.licenses="MIT" \ - org.opencontainers.image.ref.name="ventx/debug-pod" \ + org.opencontainers.image.ref.name="hajowieland/debug-pod" \ org.opencontainers.image.revision="${REVISION}" \ - org.opencontainers.image.source="https://github.com/ventx/debug-pod" \ - org.opencontainers.image.url="https://github.com/ventx/debug-pod.git" \ + org.opencontainers.image.source="https://github.com/hajowieland/debug-pod" \ + org.opencontainers.image.url="https://github.com/hajowieland/debug-pod.git" \ org.opencontainers.image.version="${VERSION}" \ - org.opencontainers.image.vendor="ventx GmbH" + org.opencontainers.image.vendor="Wieland IT-Consulting" +ENV AWSCLI="2.36.39" ENV DEBIAN_FRONTEND="noninteractive" -ENV KUBECTL="1.25.11" +ENV ETCD="v3.7.1" +ENV FLUXCD_PLUGINS="/usr/local/bin" +ENV FLUXCLI="2.9.5" +ENV FLUXSCHEMA="0.12.1" +ENV KUBECTL="1.37.0" ENV TZ="Europe/Berlin" -ENV YQ="4.34.1" -ENV XH="0.18.0" +ENV YQ="4.53.6" -# Instal packages +# Install packages +# hadolint ignore=DL3008 RUN apt-get update && apt-get install -y --no-install-recommends \ - tzdata=2023c-0ubuntu0.22.04.2 \ - ca-certificates=20230311ubuntu0.22.04.1 \ - curl=7.81.0-1ubuntu1.10 \ - bind9-dnsutils=1:9.18.12-0ubuntu0.22.04.2 \ - iputils-ping=3:20211215-1 \ - jq=1.6-2.1ubuntu3 \ - git=1:2.34.1-1ubuntu1.9 \ - gnupg=2.2.27-3ubuntu2.1 \ - less=590-1ubuntu0.22.04.1 \ - netcat=1.218-4ubuntu1 \ - nmap=7.91+dfsg1+really7.80+dfsg1-2ubuntu0.1 \ - openssh-client=1:8.9p1-3ubuntu0.1 \ - postgresql-client=14+238 \ - tree=2.0.2-1 \ - vim-tiny=2:8.2.3995-1ubuntu2.8 \ - wget=1.21.2-2ubuntu1 \ + tzdata \ + ca-certificates \ + curl \ + bind9-dnsutils \ + iputils-ping \ + jq \ + git \ + gnupg \ + less \ + netcat-openbsd \ + nmap \ + openssh-client \ + postgresql-client \ + tcpdump \ + tree \ + unzip \ + vim-tiny \ + wget \ + yamllint \ && rm -rf /var/lib/apt/lists/* @@ -52,22 +60,48 @@ RUN echo "ca_certificate=/etc/ssl/certs/ca-certificates.crt" > "$HOME/.wgetrc" RUN ln -fs /usr/share/zoneinfo/$TZ /etc/localtime && \ dpkg-reconfigure --frontend noninteractive tzdata +# AWS CLI +RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=aarch64; elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then ARCHITECTURE=none; else ARCHITECTURE=x86_64; fi && \ + if [ "$ARCHITECTURE" = "none" ]; then echo "AWS CLI v2 has no armv7 release, skipping"; else \ + curl -fSsL -o /tmp/awscliv2.zip "https://awscli.amazonaws.com/awscli-exe-linux-${ARCHITECTURE}-${AWSCLI}.zip" && \ + unzip -q /tmp/awscliv2.zip -d /tmp && \ + /tmp/aws/install && \ + rm -rf /tmp/aws /tmp/awscliv2.zip && \ + aws --version; fi + +# etcdctl + etcdutl +RUN if [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=arm64; elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then ARCHITECTURE=none; else ARCHITECTURE=amd64; fi && \ + if [ "$ARCHITECTURE" = "none" ]; then echo "etcd has no armv7 release, skipping"; else \ + curl -fSsL -o /tmp/etcd.tar.gz "https://github.com/etcd-io/etcd/releases/download/${ETCD}/etcd-${ETCD}-linux-${ARCHITECTURE}.tar.gz" && \ + tar xOzf /tmp/etcd.tar.gz "etcd-${ETCD}-linux-${ARCHITECTURE}/etcdctl" > /usr/local/bin/etcdctl && \ + tar xOzf /tmp/etcd.tar.gz "etcd-${ETCD}-linux-${ARCHITECTURE}/etcdutl" > /usr/local/bin/etcdutl && \ + chmod +x /usr/local/bin/etcdctl /usr/local/bin/etcdutl && \ + rm -f /tmp/etcd.tar.gz && \ + etcdctl version && etcdutl version; fi + +# Flux CLI +RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCHITECTURE=amd64; elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then ARCHITECTURE=arm; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=arm64; else ARCHITECTURE=amd64; fi && \ + curl -fSsL -o /tmp/flux.tar.gz "https://github.com/fluxcd/flux2/releases/download/v${FLUXCLI}/flux_${FLUXCLI}_linux_${ARCHITECTURE}.tar.gz" && \ + tar xzf /tmp/flux.tar.gz -C /tmp && \ + mv /tmp/flux /usr/local/bin/ && \ + rm -rf /tmp/flux* && \ + flux --version + +# Flux Schema plugin +RUN if [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then echo "Flux Schema has no armv7 release, skipping"; else \ + flux plugin install "schema@${FLUXSCHEMA}" && \ + flux schema version; fi + # kubectl RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCHITECTURE=linux/amd64; elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then ARCHITECTURE=linux/arm; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=linux/arm64; else ARCHITECTURE=linux/amd64; fi && \ - curl -SsL -o /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL}/bin/${ARCHITECTURE}/kubectl && \ - chmod +x /usr/local/bin/kubectl + curl -fSsL -o /usr/local/bin/kubectl https://dl.k8s.io/release/v${KUBECTL}/bin/${ARCHITECTURE}/kubectl && \ + chmod +x /usr/local/bin/kubectl && \ + kubectl version --client # yq RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCHITECTURE=amd64; elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then ARCHITECTURE=arm; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=arm64; else ARCHITECTURE=amd64; fi && \ - curl -SsL -o /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v${YQ}/yq_linux_${ARCHITECTURE} && \ - chmod +x /usr/local/bin/yq - -# xh -WORKDIR /tmp -RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCHITECTURE=x86_64; elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then ARCHITECTURE=arm; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=aarch64; else ARCHITECTURE=x86_64; fi && \ - curl -SsL -o /tmp/xh.tar.gz "https://github.com/ducaale/xh/releases/download/v${XH}/xh-v${XH}-${ARCHITECTURE}-unknown-linux-$(if [ $ARCHITECTURE = "arm" ]; then echo "gnueabihf"; else echo "musl"; fi).tar.gz" && \ - tar xfz /tmp/xh.tar.gz && mv /tmp/xh-*/xh /usr/local/bin && \ - rm -rf /tmp/xh* - -CMD ["kubectl", "version", "--short"] + curl -fSsL -o /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v${YQ}/yq_linux_${ARCHITECTURE} && \ + chmod +x /usr/local/bin/yq && \ + yq --version +CMD ["kubectl", "version", "--client"] diff --git a/LICENSE b/LICENSE index 3a05e44..14b4171 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 ventx GmbH +Copyright (c) 2026 Hans Jörg Wieland Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 43253f5..4a052e9 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,19 @@ # debug-pod -[![Docker Pulls](https://img.shields.io/docker/pulls/ventx/debug-pod.svg)](https://hub.docker.com/r/ventx/debug-pod/) +[![Docker Pulls](https://img.shields.io/docker/pulls/hajowieland/debug-pod.svg)](https://hub.docker.com/r/hajowieland/debug-pod/) Multi-Arch Debug Pod for Kubernetes ## Docker Hub -[ventx/debug-pod:0.7.0](https://hub.docker.com/r/ventx/debug-pod) +[hajowieland/debug-pod:0.9.0](https://hub.docker.com/r/hajowieland/debug-pod) ## Docker image * OS: Ubuntu -* Version: 22.04 LTS ("Jammy") +* Version: 26.04 LTS ("Resolute") ## Architectures @@ -25,29 +25,31 @@ Multi-Arch Debug Pod for Kubernetes ## Installed Packages (apt) -* [ca-certificates](https://packages.ubuntu.com/jammy/ca-certificates) -* [curl](https://packages.ubuntu.com/jammy/curl) -* [dnsutils](https://packages.ubuntu.com/jammy/bind9-dnsutils) -* [git](https://packages.ubuntu.com/jammy/git) -* [iputils-ping](https://packages.ubuntu.com/jammy/iputils-ping) -* [jq](https://packages.ubuntu.com/jammy/jq) -* [less](https://packages.ubuntu.com/jammy/less) -* [netcat](https://packages.ubuntu.com/jammy/netcat) -* [nmap](https://packages.ubuntu.com/jammy/nmap) -* [openssh-client](https://packages.ubuntu.com/jammy/openssh-client) -* [postgresql-client](https://packages.ubuntu.com/jammy/postgresql-client) -* [tree](https://packages.ubuntu.com/jammy/tree) -* [tzdata](https://packages.ubuntu.com/jammy/tzdata) -* [vim-tiny](https://packages.ubuntu.com/jammy/vim-tiny) -* [wget](https://packages.ubuntu.com/jammy/wget) - - -## Installed Packages (go binaries) - +* [ca-certificates](https://packages.ubuntu.com/resolute/ca-certificates) +* [curl](https://packages.ubuntu.com/resolute/curl) +* [dnsutils](https://packages.ubuntu.com/resolute/bind9-dnsutils) +* [git](https://packages.ubuntu.com/resolute/git) +* [gnupg](https://packages.ubuntu.com/resolute/gnupg) +* [iputils-ping](https://packages.ubuntu.com/resolute/iputils-ping) +* [jq](https://packages.ubuntu.com/resolute/jq) +* [less](https://packages.ubuntu.com/resolute/less) +* [netcat-openbsd](https://packages.ubuntu.com/resolute/netcat-openbsd) +* [nmap](https://packages.ubuntu.com/resolute/nmap) +* [openssh-client](https://packages.ubuntu.com/resolute/openssh-client) +* [postgresql-client](https://packages.ubuntu.com/resolute/postgresql-client) +* [tree](https://packages.ubuntu.com/resolute/tree) +* [tzdata](https://packages.ubuntu.com/resolute/tzdata) +* [unzip](https://packages.ubuntu.com/resolute/unzip) +* [vim-tiny](https://packages.ubuntu.com/resolute/vim-tiny) +* [wget](https://packages.ubuntu.com/resolute/wget) +* [yamllint](https://packages.ubuntu.com/resolute/yamllint) + + +## Installed Packages (binaries) + +* [aws](https://github.com/aws/aws-cli) — amd64/arm64 only (no armv7 release) +* [etcdctl / etcdutl](https://github.com/etcd-io/etcd) — amd64/arm64 only (no armv7 release) +* [flux](https://github.com/fluxcd/flux2) +* [flux schema](https://github.com/fluxcd/flux-schema) — amd64/arm64 only (no armv7 release) * [kubectl](https://github.com/kubernetes/kubectl) * [yq](https://github.com/mikefarah/yq) - - -## Installed Packages (rust binaries) - -* [xh](https://github.com/ducaale/xh) diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..9df7a6c --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", + "include-v-in-tag": false, + "packages": { + ".": { + "release-type": "simple", + "extra-files": ["README.md"] + } + } +} diff --git a/version.txt b/version.txt new file mode 100644 index 0000000..ac39a10 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +0.9.0