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
11 changes: 5 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,13 @@ jobs:
export VERSION="${{ github.ref_name }}"
export LINUX_AMD64_SHA=$(grep "kubectl-oadp-linux-amd64.tar.gz" checksums.txt | cut -d' ' -f1)
export LINUX_ARM64_SHA=$(grep "kubectl-oadp-linux-arm64.tar.gz" checksums.txt | cut -d' ' -f1)
export LINUX_PPC64LE_SHA=$(grep "kubectl-oadp-linux-ppc64le.tar.gz" checksums.txt | cut -d' ' -f1)
export LINUX_S390X_SHA=$(grep "kubectl-oadp-linux-s390x.tar.gz" checksums.txt | cut -d' ' -f1)
export DARWIN_AMD64_SHA=$(grep "kubectl-oadp-darwin-amd64.tar.gz" checksums.txt | cut -d' ' -f1)
export DARWIN_ARM64_SHA=$(grep "kubectl-oadp-darwin-arm64.tar.gz" checksums.txt | cut -d' ' -f1)
export WINDOWS_AMD64_SHA=$(grep "kubectl-oadp-windows-amd64.tar.gz" checksums.txt | cut -d' ' -f1)
export WINDOWS_ARM64_SHA=$(grep "kubectl-oadp-windows-arm64.tar.gz" checksums.txt | cut -d' ' -f1)

# Validate all checksums were found
if [[ -z "$LINUX_AMD64_SHA" || -z "$LINUX_ARM64_SHA" || -z "$LINUX_PPC64LE_SHA" || -z "$LINUX_S390X_SHA" || -z "$DARWIN_AMD64_SHA" || -z "$DARWIN_ARM64_SHA" || -z "$WINDOWS_AMD64_SHA" || -z "$WINDOWS_ARM64_SHA" ]]; then
if [[ -z "$LINUX_AMD64_SHA" || -z "$LINUX_ARM64_SHA" || -z "$DARWIN_AMD64_SHA" || -z "$DARWIN_ARM64_SHA" || -z "$WINDOWS_AMD64_SHA" || -z "$WINDOWS_ARM64_SHA" ]]; then
echo "❌ Some checksums are missing!"
echo "Available checksums:"
cat checksums.txt
Expand All @@ -139,8 +137,6 @@ jobs:
echo "Version: $VERSION"
echo "Linux amd64: ${LINUX_AMD64_SHA:0:16}..."
echo "Linux arm64: ${LINUX_ARM64_SHA:0:16}..."
echo "Linux ppc64le: ${LINUX_PPC64LE_SHA:0:16}..."
echo "Linux s390x: ${LINUX_S390X_SHA:0:16}..."
echo "Darwin amd64: ${DARWIN_AMD64_SHA:0:16}..."
echo "Darwin arm64: ${DARWIN_ARM64_SHA:0:16}..."
echo "Windows amd64: ${WINDOWS_AMD64_SHA:0:16}..."
Expand Down Expand Up @@ -196,4 +192,7 @@ jobs:
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update new version in krew-index
uses: rajatjindal/krew-release-bot@v0.0.46
66 changes: 66 additions & 0 deletions .krew.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
apiVersion: krew.googlecontainertools.github.com/v1alpha2
kind: Plugin
metadata:
name: kubectl-oadp
spec:
version: {{ .TagName }}
homepage: https://github.com/migtools/oadp-cli
platforms:
- selector:
matchLabels:
os: darwin
arch: amd64
{{addURIAndSha "https://github.com/migtools/oadp-cli/releases/download/{{ .TagName }}/kubectl-oadp_{{ .TagName }}_darwin_amd64.tar.gz" .TagName }}
bin: kubectl-oadp
- selector:
matchLabels:
os: darwin
arch: arm64
{{addURIAndSha "https://github.com/migtools/oadp-cli/releases/download/{{ .TagName }}/kubectl-oadp_{{ .TagName }}_darwin_arm64.tar.gz" .TagName }}
bin: kubectl-oadp
- selector:
matchLabels:
os: linux
arch: amd64
{{addURIAndSha "https://github.com/migtools/oadp-cli/releases/download/{{ .TagName }}/kubectl-oadp_{{ .TagName }}_linux_amd64.tar.gz" .TagName }}
bin: kubectl-oadp
- selector:
matchLabels:
os: linux
arch: arm64
{{addURIAndSha "https://github.com/migtools/oadp-cli/releases/download/{{ .TagName }}/kubectl-oadp_{{ .TagName }}_linux_arm64.tar.gz" .TagName }}
bin: kubectl-oadp
- selector:
matchLabels:
os: windows
arch: amd64
{{addURIAndSha "https://github.com/migtools/oadp-cli/releases/download/{{ .TagName }}/kubectl-oadp_{{ .TagName }}_windows_amd64.tar.gz" .TagName }}
bin: kubectl-oadp
- selector:
matchLabels:
os: windows
arch: arm64
{{addURIAndSha "https://github.com/migtools/oadp-cli/releases/download/{{ .TagName }}/kubectl-oadp_{{ .TagName }}_windows_arm64.tar.gz" .TagName }}
bin: kubectl-oadp
shortDescription: CLI for OpenShift APIs for Data Protection (OADP) operator
description: |
kubectl-oadp is a kubectl plugin for managing OpenShift API for Data Protection (OADP) backup and restore operations.

It provides both admin and non-admin commands:
- Admin commands: Full OADP/Velero backup and restore operations
- Non-admin commands: Namespace-scoped backup operations with automatic namespace detection

The plugin automatically detects the appropriate namespace from your current kubectl context
for non-admin operations, following the principle of least privilege.

Features:
- Create and manage OADP backups
- View backup status and logs
- Delete backups
- Support for both cluster-admin and namespace-scoped operations
caveats: |
This plugin requires:
- OADP operator to be installed in the cluster
- Ensure the velero namespace (where the server is running) is correct: Run `kubectl oadp client config set namespace=<namespace>` to set the velero namespace
- Appropriate RBAC permissions for the operations you want to perform
- Read more documentation at: https://github.com/migtools/oadp-cli
4 changes: 1 addition & 3 deletions oadp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
spec:
version: ${VERSION}
homepage: https://github.com/migtools/oadp-cli
shortDescription: Manage OpenShift API for Data Protection (OADP) backup and restore operations
shortDescription: CLI for OpenShift API for Data Protection (OADP)
description: |
kubectl-oadp is a kubectl plugin for managing OpenShift API for Data Protection (OADP) backup and restore operations.

Expand All @@ -21,12 +21,10 @@ spec:
- View backup status and logs
- Delete backups
- Support for both cluster-admin and namespace-scoped operations
- Integration with kubectl context for namespace detection
caveats: |
This plugin requires:
- OADP operator to be installed in the cluster
- Appropriate RBAC permissions for the operations you want to perform
- For non-admin operations: namespace-scoped permissions in your current kubectl context namespace
platforms:
- selector:
matchLabels:
Expand Down
Loading