-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: debug pod #224
build: debug pod #224
Conversation
WalkthroughThis update introduces a new GitHub Actions workflow to manually trigger the build and push of a debug pod Docker image to multiple container registries. Additionally, the GreptimeDB cluster Helm chart version has been updated from 0.2.47 to 0.2.48 with supporting documentation enhancements. A new Dockerfile and README have been added to define and explain a debug pod image based on Ubuntu 22.04 that installs essential CLI tools. Minor comments in configuration files have also been updated to reference additional debug pod documentation. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant GA as GitHub Actions
participant D1 as DockerHub
participant D2 as AliCloud Registry
U->>GA: Trigger workflow_dispatch
GA->>GA: Checkout repository (actions/checkout)
GA->>GA: Setup QEMU and Docker Buildx
GA->>GA: Login to DockerHub and AliCloud
GA->>GA: Generate image tag
GA->>D1: Build & push image to DockerHub
GA->>D2: Build & push image to AliCloud Registry
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (6)
.github/workflows/build-debug-pod-image.yaml (1)
33-39
: Consider using GitHub's built-in SHA and date variables.Instead of using git and date commands, you can use GitHub's built-in variables for a more reliable solution.
- - name: Configure build image tag # The image tag will be like '20230116-6441c463' - shell: bash - run: | - buildTime=`date "+%Y%m%d"` - commitShortSHA=`git log -1 --pretty=format:"%h"` - IMAGE_TAG="$buildTime-$commitShortSHA" - echo "IMAGE_TAG=${IMAGE_TAG}" >> $GITHUB_ENV + - name: Configure build image tag + shell: bash + run: | + echo "IMAGE_TAG=$(date -u '+%Y%m%d')-${GITHUB_SHA::7}" >> $GITHUB_ENVdocker/debug-pod/README.md (3)
3-3
: Improve readability with proper spacing.There's a missing space between "tools" and the opening parenthesis.
-This docker image is designed for debugging purposes and includes a variety of useful tools(such as `mysql-client` and `kubectl`, etc.). +This docker image is designed for debugging purposes and includes useful tools (such as `mysql-client` and `kubectl`, etc.).🧰 Tools
🪛 LanguageTool
[style] ~3-~3: The phrase “a variety of” may be wordy. To make your writing clearer, consider replacing it.
Context: ...ned for debugging purposes and includes a variety of useful tools(such asmysql-client
and...(A_VARIETY_OF)
11-18
: Fix list indentation and add version information.The list indentation should be 2 spaces instead of 4. Also, consider adding version information for each tool.
- **Tools Included**: - - `mysql-client` - - `postgresql-client` - - `kubectl` - - `etcdctl` - - `AWS CLI` - - `AliCloud CLI` - - `Google Cloud CLI` + - `mysql-client` + - `postgresql-client` + - `kubectl` (latest stable) + - `etcdctl` (v3.5.0) + - `AWS CLI` (v2) + - `AliCloud CLI` (latest) + - `Google Cloud CLI` (latest)🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
12-12: Unordered list indentation
Expected: 2; Actual: 4(MD007, ul-indent)
13-13: Unordered list indentation
Expected: 2; Actual: 4(MD007, ul-indent)
14-14: Unordered list indentation
Expected: 2; Actual: 4(MD007, ul-indent)
15-15: Unordered list indentation
Expected: 2; Actual: 4(MD007, ul-indent)
16-16: Unordered list indentation
Expected: 2; Actual: 4(MD007, ul-indent)
17-17: Unordered list indentation
Expected: 2; Actual: 4(MD007, ul-indent)
18-18: Unordered list indentation
Expected: 2; Actual: 4(MD007, ul-indent)
57-57
: Add a note about image availability.The example uses a placeholder tag but doesn't mention where to find available tags.
- - image: greptime/greptime-tool:${tag} # Replace ${tag} with the desired image tag, which you can find here: https://hub.docker.com/repository/docker/greptime/greptime-tool/tags + - image: greptime/greptime-tool:${tag} + # Replace ${tag} with the desired image tag. + # Available tags can be found at: + # - DockerHub: https://hub.docker.com/r/greptime/greptime-tool/tags + # - AliCloud Container Registry: <add URL>docker/debug-pod/Dockerfile (2)
4-19
: Consider reducing image size and adding version constraints.The current installation might include unnecessary dependencies and unpinned versions.
RUN apt-get update && apt-get install -y \ wget \ tar \ - sudo \ curl \ unzip \ net-tools \ iproute2 \ telnet \ make \ gcc \ - mysql-client \ - postgresql-client \ + mysql-client=8.0.* \ + postgresql-client=14.* \ jq \ python3 \ - python3-pip + python3-pip \ + && rm -rf /var/lib/apt/lists/*
62-62
: Consider using a more appropriate entrypoint.Using
tail -f /dev/null
as the CMD is a common anti-pattern.-CMD ["tail", "-f", "/dev/null"] +# Use a shell as the entrypoint for interactive debugging +ENTRYPOINT ["/bin/bash"]
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.github/workflows/build-debug-pod-image.yaml
(1 hunks)charts/greptimedb-cluster/Chart.yaml
(1 hunks)charts/greptimedb-cluster/README.md
(2 hunks)charts/greptimedb-cluster/values.yaml
(1 hunks)docker/debug-pod/Dockerfile
(1 hunks)docker/debug-pod/README.md
(1 hunks)
✅ Files skipped from review due to trivial changes (3)
- charts/greptimedb-cluster/Chart.yaml
- charts/greptimedb-cluster/values.yaml
- charts/greptimedb-cluster/README.md
🧰 Additional context used
🪛 LanguageTool
docker/debug-pod/README.md
[style] ~3-~3: The phrase “a variety of” may be wordy. To make your writing clearer, consider replacing it.
Context: ...ned for debugging purposes and includes a variety of useful tools(such as mysql-client
and...
(A_VARIETY_OF)
🪛 markdownlint-cli2 (0.17.2)
docker/debug-pod/README.md
12-12: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
13-13: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
14-14: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
15-15: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
16-16: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
17-17: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
18-18: Unordered list indentation
Expected: 2; Actual: 4
(MD007, ul-indent)
🪛 Hadolint (2.12.0)
docker/debug-pod/Dockerfile
[error] 22-22: Do not use sudo as it leads to unpredictable behavior. Use a tool like gosu to enforce root
(DL3004)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: chart-test
🔇 Additional comments (1)
.github/workflows/build-debug-pod-image.yaml (1)
41-50
: LGTM! Multi-platform build configuration looks good.The build configuration correctly handles:
- Multi-platform builds (amd64, arm64)
- Pushing to multiple registries
- Using environment variables for image tag
Summary by CodeRabbit
New Features
Documentation
Chores