Skip to content

Commit aae9332

Browse files
authored
Updates for kubectl name change (#19)
1 parent f0aae9c commit aae9332

File tree

5 files changed

+39
-39
lines changed

5 files changed

+39
-39
lines changed

.github/workflows/pull_request.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ jobs:
2828
run: go mod download
2929

3030
- name: Go Build amd64
31-
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o k8s-parallel-exec-amd64
31+
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o kubectl-parallel-exec-amd64

.github/workflows/release.yml

+22-22
Original file line numberDiff line numberDiff line change
@@ -28,44 +28,44 @@ jobs:
2828

2929
- name: Go Build linux/amd64
3030
run: |
31-
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=${{ github.event.release.tag_name }}" -o k8s-parallel-exec-linux-amd64
32-
tar zcf k8s-parallel-exec-linux-amd64.tgz k8s-parallel-exec-linux-amd64
33-
echo "KPE_LINUX_AMD64_SHA256=$(sha256sum k8s-parallel-exec-linux-amd64.tgz | awk '{print $1}')" >> $GITHUB_ENV
31+
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X main.version=${{ github.event.release.tag_name }}" -o kubectl-parallel-exec-linux-amd64
32+
tar zcf kubectl-parallel-exec-linux-amd64.tgz kubectl-parallel-exec-linux-amd64
33+
echo "KPE_LINUX_AMD64_SHA256=$(sha256sum kubectl-parallel-exec-linux-amd64.tgz | awk '{print $1}')" >> $GITHUB_ENV
3434
3535
- name: Go Build linux/arm64
3636
run: |
37-
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-X main.version=${{ github.event.release.tag_name }}" -o k8s-parallel-exec-linux-arm64
38-
tar zcf k8s-parallel-exec-linux-arm64.tgz k8s-parallel-exec-linux-arm64
39-
echo "KPE_LINUX_ARM64_SHA256=$(sha256sum k8s-parallel-exec-linux-arm64.tgz | awk '{print $1}')" >> $GITHUB_ENV
37+
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-X main.version=${{ github.event.release.tag_name }}" -o kubectl-parallel-exec-linux-arm64
38+
tar zcf kubectl-parallel-exec-linux-arm64.tgz kubectl-parallel-exec-linux-arm64
39+
echo "KPE_LINUX_ARM64_SHA256=$(sha256sum kubectl-parallel-exec-linux-arm64.tgz | awk '{print $1}')" >> $GITHUB_ENV
4040
4141
- name: Go Build darwin/amd64
4242
run: |
43-
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.version=${{ github.event.release.tag_name }}" -o k8s-parallel-exec-darwin-amd64
44-
tar zcf k8s-parallel-exec-darwin-amd64.tgz k8s-parallel-exec-darwin-amd64
45-
echo "KPE_DARWIN_AMD64_SHA256=$(sha256sum k8s-parallel-exec-darwin-amd64.tgz | awk '{print $1}')" >> $GITHUB_ENV
43+
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-X main.version=${{ github.event.release.tag_name }}" -o kubectl-parallel-exec-darwin-amd64
44+
tar zcf kubectl-parallel-exec-darwin-amd64.tgz kubectl-parallel-exec-darwin-amd64
45+
echo "KPE_DARWIN_AMD64_SHA256=$(sha256sum kubectl-parallel-exec-darwin-amd64.tgz | awk '{print $1}')" >> $GITHUB_ENV
4646
4747
- name: Go Build darwin/arm64
4848
run: |
49-
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags "-X main.version=${{ github.event.release.tag_name }}" -o k8s-parallel-exec-darwin-arm64
50-
tar zcf k8s-parallel-exec-darwin-arm64.tgz k8s-parallel-exec-darwin-arm64
51-
echo "KPE_DARWIN_ARM64_SHA256=$(sha256sum k8s-parallel-exec-darwin-arm64.tgz | awk '{print $1}')" >> $GITHUB_ENV
49+
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags "-X main.version=${{ github.event.release.tag_name }}" -o kubectl-parallel-exec-darwin-arm64
50+
tar zcf kubectl-parallel-exec-darwin-arm64.tgz kubectl-parallel-exec-darwin-arm64
51+
echo "KPE_DARWIN_ARM64_SHA256=$(sha256sum kubectl-parallel-exec-darwin-arm64.tgz | awk '{print $1}')" >> $GITHUB_ENV
5252
53-
- name: Publish k8s-parallel-exec builds to assets
53+
- name: Publish kubectl-parallel-exec builds to assets
5454
uses: cin/github-action-publish-binaries@master
5555
env:
5656
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5757
with:
58-
args: './k8s-parallel-exec-*.tgz'
58+
args: './kubectl-parallel-exec-*.tgz'
5959

6060
- name: Checkout Homebrew tap repository
6161
uses: actions/checkout@v2
6262
with:
63-
repository: cin/homebrew-k8s-parallel-exec
63+
repository: cin/homebrew-kubectl-parallel-exec
6464
token: ${{ secrets.HOMEBREW_UPDATE_TOKEN }}
6565

6666
- name: Update Homebrew formula
6767
run: |
68-
FORMULA_FILE="k8s-parallel-exec.rb"
68+
FORMULA_FILE="kubectl-parallel-exec.rb"
6969
NEW_VERSION="${{ github.event.release.tag_name }}"
7070
sed -i "s|version \"[^\"]*\"|version \"${NEW_VERSION}\"|g" "${FORMULA_FILE}"
7171
@@ -77,15 +77,15 @@ jobs:
7777
}1' "${FORMULA_FILE}"
7878
}
7979
80-
update_sha k8s-parallel-exec-linux-amd64.tgz ${{ env.KPE_LINUX_AMD64_SHA256 }}
81-
update_sha k8s-parallel-exec-linux-arm64.tgz ${{ env.KPE_LINUX_ARM64_SHA256 }}
82-
update_sha k8s-parallel-exec-darwin-amd64.tgz ${{ env.KPE_DARWIN_AMD64_SHA256 }}
83-
update_sha k8s-parallel-exec-darwin-arm64.tgz ${{ env.KPE_DARWIN_ARM64_SHA256 }}
80+
update_sha kubectl-parallel-exec-linux-amd64.tgz ${{ env.KPE_LINUX_AMD64_SHA256 }}
81+
update_sha kubectl-parallel-exec-linux-arm64.tgz ${{ env.KPE_LINUX_ARM64_SHA256 }}
82+
update_sha kubectl-parallel-exec-darwin-amd64.tgz ${{ env.KPE_DARWIN_AMD64_SHA256 }}
83+
update_sha kubectl-parallel-exec-darwin-arm64.tgz ${{ env.KPE_DARWIN_ARM64_SHA256 }}
8484
8585
- name: Commit and push changes
8686
run: |
8787
git config --local user.email "[email protected]"
8888
git config --local user.name "GitHub Action"
89-
git add "k8s-parallel-exec.rb"
90-
git commit -m "Update k8s-parallel-exec to ${{ github.event.release.tag_name }}"
89+
git add "kubectl-parallel-exec.rb"
90+
git commit -m "Update kubectl-parallel-exec to ${{ github.event.release.tag_name }}"
9191
git push

README.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
![Project Logo](./assets/logo.png)
2-
# k8s-parallel-exec
2+
# kubectl-parallel-exec
33

4-
[![Release Workflow](https://github.com/cin/k8s-parallel-exec/actions/workflows/release.yml/badge.svg)](https://github.com/cin/k8s-parallel-exec/actions/workflows/release.yml)
4+
[![Release Workflow](https://github.com/cin/kubectl-parallel-exec/actions/workflows/release.yml/badge.svg)](https://github.com/cin/kubectl-parallel-exec/actions/workflows/release.yml)
55

66
A mostly GPT-4 created Golang-based tool for executing commands in parallel on Kubernetes pods with specified labels, similar to GNU's `parallel` tool. GPT-4 even helped debug, name the project, create this README (aside from this), create a logo (when DALL-E's not overloaded), and craft the announcement tweet for the project.
77

@@ -21,42 +21,42 @@ A mostly GPT-4 created Golang-based tool for executing commands in parallel on K
2121

2222
### Homebrew
2323

24-
You can install `k8s-parallel-exec` using Homebrew on macOS and Linux:
24+
You can install `kubectl-parallel-exec` using Homebrew on macOS and Linux:
2525

2626
```bash
27-
brew install cin/k8s-parallel-exec/k8s-parallel-exec
27+
brew install cin/kubectl-parallel-exec/kubectl-parallel-exec
2828
```
2929

3030
### From Source
3131

32-
You can also build and install the k8s-parallel-exec from source. To do this, follow these steps:
32+
You can also build and install the kubectl-parallel-exec from source. To do this, follow these steps:
3333

3434
1. Ensure that you have Go installed on your system. You can check this by running go version. If you don't have Go installed, you can follow the installation instructions on the [official Go website](https://golang.org/doc/install).
3535

3636
2. Clone the repository:
3737

3838
```sh
39-
git clone https://github.com/your-github-username/k8s-parallel-exec.git
39+
git clone https://github.com/your-github-username/kubectl-parallel-exec.git
4040
```
4141

4242
3. Change into the project directory:
4343
```sh
44-
cd k8s-parallel-exec
44+
cd kubectl-parallel-exec
4545
```
4646

4747
4. Build the binary:
4848
```sh
49-
go build -o k8s-parallel-exec
49+
go build -o kubectl-parallel-exec
5050
```
5151

5252
5. Move the binary to a directory in your PATH (optional):
5353
```sh
54-
sudo mv k8s-parallel-exec /usr/local/bin/
54+
sudo mv kubectl-parallel-exec /usr/local/bin/
5555
```
5656

5757
## Usage
5858
```sh
59-
k8s-parallel-exec -kubeconfig /path/to/kubeconfig -c container-name -l label-selector command-to-execute
59+
kubectl-parallel-exec -kubeconfig /path/to/kubeconfig -c container-name -l label-selector command-to-execute
6060
```
6161
- `-kubeconfig`: Path to the kubeconfig file. If not provided, in-cluster configuration will be used.
6262
- `-c`: Container to execute the command against.
@@ -65,7 +65,7 @@ k8s-parallel-exec -kubeconfig /path/to/kubeconfig -c container-name -l label-sel
6565

6666
Example
6767
```sh
68-
k8s-parallel-exec -kubeconfig ~/.kube/config -c cassandra -l app=cassandra nodetool status
68+
kubectl-parallel-exec -kubeconfig ~/.kube/config -c cassandra -l app=cassandra nodetool status
6969
```
7070
This command would execute `nodetool status` on all the Cassandra containers in pods with the label "app=cassandra" in parallel, and then aggregate and display the results.
7171

@@ -74,14 +74,14 @@ If authentication is enabled and you don't want to expose credentials, you may h
7474
```bash
7575
KPE_LABELS="cassandra-cluster-component=cassandra
7676
,cassandra-cluster-instance=test-cluster"
77-
k8s-parallel-exec -kubeconfig ~/.kube/kind-kcfg -l $KPE_LABELS -c cassandra -- bash -c 'nodetool --ssl -u $(cat /etc/cassandra-auth-config/admin-role) -pw $(cat /etc/cassandra-auth-config/admin-password) status'
77+
kubectl-parallel-exec -kubeconfig ~/.kube/kind-kcfg -l $KPE_LABELS -c cassandra -- bash -c 'nodetool --ssl -u $(cat /etc/cassandra-auth-config/admin-role) -pw $(cat /etc/cassandra-auth-config/admin-password) status'
7878
```
7979

8080
Currently working on a way to make this better...
8181

8282
## Possible Features
8383

84-
Here are some additional features that could make k8s-parallel-exec more useful:
84+
Here are some additional features that could make kubectl-parallel-exec more useful:
8585

8686
Configurable concurrency: Allow users to set the maximum number of concurrent commands that can be executed at once. This would help manage resource usage and prevent overloading the cluster.
8787

@@ -103,7 +103,7 @@ Progress tracking and timeout: Implement progress tracking to show the status of
103103

104104
Save and load command sets: Allow users to save sets of commands and their associated options to configuration files, making it easy to run common sets of commands without having to specify all the options every time.
105105

106-
These features could enhance the usability and flexibility of k8s-parallel-exec, making it an even more valuable tool for Kubernetes users.
106+
These features could enhance the usability and flexibility of kubectl-parallel-exec, making it an even more valuable tool for Kubernetes users.
107107

108108
## Credits
109109
The initial implementation for this project were provided by ChatGPT from OpenAI. Other than the idea for the project, ChatGPT created nearly all of the code in this repo (even the README.md).

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/cin/k8s-parallel-exec
1+
module github.com/cin/kubectl-parallel-exec
22

33
go 1.20
44

logo.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Logo
22

3-
Create a modern and dynamic logo for the k8s-parallel-exec project that represents the essence of parallel command execution in Kubernetes clusters. The design should feature a stylized version of the Kubernetes logo, with multiple arrows branching out from the central hexagon, symbolizing parallelism and efficient distribution of tasks. Incorporate vibrant colors, such as bright cyan or green, to evoke a sense of speed and agility. Overlay the arrows with a subtle command line terminal icon to emphasize the CLI aspect of the tool. The project name "k8s-parallel-exec" should be displayed in a bold, contemporary font beneath the main logo.
3+
Create a modern and dynamic logo for the kubectl-parallel-exec project that represents the essence of parallel command execution in Kubernetes clusters. The design should feature a stylized version of the Kubernetes logo, with multiple arrows branching out from the central hexagon, symbolizing parallelism and efficient distribution of tasks. Incorporate vibrant colors, such as bright cyan or green, to evoke a sense of speed and agility. Overlay the arrows with a subtle command line terminal icon to emphasize the CLI aspect of the tool. The project name "kubectl-parallel-exec" should be displayed in a bold, contemporary font beneath the main logo.

0 commit comments

Comments
 (0)