Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,37 @@ jobs:

console.log(`Uploaded ${archiveName} and ${checksumName}`);
}

console.log('All release assets uploaded successfully');

- name: Wait for assets to be available
run: |
echo "Waiting 30 seconds for GitHub to propagate release assets..."
sleep 30

- name: Verify all assets are available
run: |
VERSION="${{ github.event.release.tag_name }}"
ASSETS=(
"kubectl-sql-${VERSION}-linux-amd64.tar.gz"
"kubectl-sql-${VERSION}-linux-arm64.tar.gz"
"kubectl-sql-${VERSION}-darwin-amd64.tar.gz"
"kubectl-sql-${VERSION}-darwin-arm64.tar.gz"
"kubectl-sql-${VERSION}-windows-amd64.zip"
)

echo "Verifying release assets are downloadable..."
for asset in "${ASSETS[@]}"; do
url="https://github.com/yaacov/kubectl-sql/releases/download/${VERSION}/${asset}"
echo "Checking: $url"
if curl -sSL --fail -I "$url" > /dev/null; then
echo "✅ $asset is available"
else
echo "❌ $asset is not available"
exit 1
fi
done
echo "All assets verified successfully!"

- name: Update Krew index
uses: rajatjindal/krew-release-bot@v0.0.46
85 changes: 85 additions & 0 deletions .krew.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
apiVersion: krew.googlecontainer.dev/v1alpha2
kind: Plugin
metadata:
name: sql
spec:
version: {{ .TagName }}
homepage: https://github.com/yaacov/kubectl-sql
shortDescription: Query Kubernetes resources using SQL-like syntax
description: |
kubectl-sql is a kubectl plugin that allows you to query Kubernetes resources
using SQL-like syntax. It supports complex queries with WHERE clauses, sorting,
limiting, and filtering across multiple resource types and namespaces.

Features:
- SQL-like query language with operators (=, !=, ~=, >, <, etc.)
- Support for all Kubernetes resource types
- Cross-namespace queries
- Multiple output formats (table, json, yaml, name)
- Array operations (any, all, len)
- Time and size unit support
caveats: |
This plugin requires kubectl to be installed and configured to access your cluster.

Examples:
# Get pods with specific labels
kubectl sql "SELECT name, status.phase FROM */pods WHERE metadata.labels.app = 'nginx'"

# Find pods with high memory usage
kubectl sql "SELECT name FROM */pods WHERE spec.containers[*].resources.requests.memory > 1Gi"
platforms:
- selector:
matchLabels:
os: linux
arch: amd64
{{addURIAndSha "https://github.com/yaacov/kubectl-sql/releases/download/{{ .TagName }}/kubectl-sql-{{ .TagName }}-linux-amd64.tar.gz" .TagName }}
files:
- from: kubectl-sql-linux-amd64
to: kubectl-sql
- from: LICENSE
to: .
bin: kubectl-sql
- selector:
matchLabels:
os: linux
arch: arm64
{{addURIAndSha "https://github.com/yaacov/kubectl-sql/releases/download/{{ .TagName }}/kubectl-sql-{{ .TagName }}-linux-arm64.tar.gz" .TagName }}
files:
- from: kubectl-sql-linux-arm64
to: kubectl-sql
- from: LICENSE
to: .
bin: kubectl-sql
- selector:
matchLabels:
os: darwin
arch: amd64
{{addURIAndSha "https://github.com/yaacov/kubectl-sql/releases/download/{{ .TagName }}/kubectl-sql-{{ .TagName }}-darwin-amd64.tar.gz" .TagName }}
files:
- from: kubectl-sql-darwin-amd64
to: kubectl-sql
- from: LICENSE
to: .
bin: kubectl-sql
- selector:
matchLabels:
os: darwin
arch: arm64
{{addURIAndSha "https://github.com/yaacov/kubectl-sql/releases/download/{{ .TagName }}/kubectl-sql-{{ .TagName }}-darwin-arm64.tar.gz" .TagName }}
files:
- from: kubectl-sql-darwin-arm64
to: kubectl-sql
- from: LICENSE
to: .
bin: kubectl-sql
- selector:
matchLabels:
os: windows
arch: amd64
{{addURIAndSha "https://github.com/yaacov/kubectl-sql/releases/download/{{ .TagName }}/kubectl-sql-{{ .TagName }}-windows-amd64.zip" .TagName }}
files:
- from: kubectl-sql-windows-amd64.exe
to: kubectl-sql.exe
- from: LICENSE
to: .
bin: kubectl-sql.exe