Skip to content
Open
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
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
[![Release](https://github.com/migtools/oadp-cli/actions/workflows/release.yml/badge.svg)](https://github.com/migtools/oadp-cli/actions/workflows/release.yml)
[![Multi-Arch Binary Push to Quay.io](https://github.com/migtools/oadp-cli/actions/workflows/quay_binaries_push.yml/badge.svg)](https://github.com/migtools/oadp-cli/actions/workflows/quay_binaries_push.yml)

A kubectl plugin for OpenShift API for Data Protection (OADP) that provides both administrative and non-administrative backup operations.
A kubectl plugin for OpenShift API for Data Protection (OADP) that provides cluster-admin backup and restore operations.

> **What it does**: Extends OADP functionality with a unified CLI that supports both cluster-wide Velero operations (admin) and namespace-scoped self-service operations (non-admin users).
> **What it does**: Extends OADP functionality with a unified CLI for cluster-wide Velero operations (backup, restore, schedule, BSL management) on OpenShift clusters running OADP 1.4.
>
> **Note (oadp-1.4 branch):** Non-admin / self-service commands (`oc oadp nonadmin …`) are not available on this branch. The OADP 1.4 operator does not ship the non-admin controller. Use OADP 1.5+ for non-admin support.


## Installation
Expand All @@ -22,7 +24,7 @@ source ~/.zshrc # or ~/.bashrc
# OR restart your terminal

# Test the installation
kubectl oadp --help
oc oadp --help

# Alternative: System-wide install (requires sudo)
make install-system
Expand All @@ -39,7 +41,8 @@ make install VELERO_NAMESPACE=custom # Use specific namespace (no detection)

| Branch | OADP line | Notes |
|--------|-----------|--------|
| [`oadp-1.5`](docs/OADP-1.5.md) | OADP 1.5 / OCP 4.19–4.21 | Dependency backport from `oadp-1.6`; see [developer doc](docs/OADP-1.5.md) |
| [`oadp-1.4`](docs/OADP-1.4.md) | OADP 1.4 / OCP 4.17–4.18 | Dependency backport from `oadp-1.5`; see [developer doc](docs/OADP-1.4.md) |
| [`oadp-1.5`](https://github.com/migtools/oadp-cli/blob/oadp-1.5/docs/OADP-1.5.md) | OADP 1.5 / OCP 4.19–4.21 | Dependency backport from `oadp-1.6`; see [developer doc](https://github.com/migtools/oadp-cli/blob/oadp-1.5/docs/OADP-1.5.md) |
| `oadp-1.6` | OADP 1.6 / OCP 4.22+ | Current Velero 1.18 line |
| `oadp-dev` | Next / development | Integration branch |

Expand All @@ -48,7 +51,7 @@ make install VELERO_NAMESPACE=custom # Use specific namespace (no detection)
**Built with:**
- [Cobra](https://github.com/spf13/cobra) - CLI framework
- [Velero client libraries](https://github.com/vmware-tanzu/velero) - Core backup functionality
- [OADP NonAdmin APIs](https://github.com/migtools/oadp-non-admin) - NonAdminBackup CRD support
- [OADP Operator](https://github.com/openshift/oadp-operator) - Operator providing Velero and backup infrastructure

**Dependencies:**
- OADP Operator installed in cluster
Expand All @@ -58,4 +61,4 @@ make install VELERO_NAMESPACE=custom # Use specific namespace (no detection)

Apache License 2.0 - see [LICENSE](LICENSE) file.

Integrates with Apache 2.0 licensed projects: [Velero](https://github.com/vmware-tanzu/velero), [OADP](https://github.com/openshift/oadp-operator), [Kubernetes](https://github.com/kubernetes/kubernetes).
Integrates with Apache 2.0 licensed projects: [Velero](https://github.com/vmware-tanzu/velero), [OADP](https://github.com/openshift/oadp-operator), [Kubernetes](https://github.com/kubernetes/kubernetes).
95 changes: 95 additions & 0 deletions docs/OADP-1.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# OADP CLI — `oadp-1.4` branch

Developer guide for the **OADP 1.4 release line** of `migtools/oadp-cli`.

## Purpose

Branch **`oadp-1.4`** builds the kubectl plugin (`kubectl oadp`) and the **download server** (`Containerfile.download`) against the same dependency stack as **OADP Operator 1.4** (Velero 1.14, k8s v0.29.x).

| OpenShift (typical) | OADP operator | oadp-cli branch |
|---------------------|---------------|-----------------|
| 4.17 – 4.18 | 1.4 | **`oadp-1.4`** |
| 4.19 – 4.21 | 1.5 | **`oadp-1.5`** |
| 4.22+ | 1.6 | **`oadp-1.6`** |

Reference: [OADP PARTNERS.md](https://github.com/openshift/oadp-operator/blob/oadp-dev/PARTNERS.md)

## Non-admin commands not included

**OADP 1.4 does not ship the non-admin controller.**
The `RELATED_IMAGE_NON_ADMIN_CONTROLLER` image is absent from the 1.4 operator and the NAC controller requires OADP operator 1.5 or later.

As a result, this CLI branch does not include nonadmin commands.
Use **OADP 1.5** or later for namespace-scoped self-service backup and restore.

## CLI features on `oadp-1.4`

- Admin Velero commands: `backup`, `restore`, `schedule`, `backup-location`, `snapshot-location`, `get`, `describe`, `delete`, `create`
- `must-gather`, `setup`, `client`, `completion`

## `oadp-1.4` vs `oadp-1.5`

### Code changes

| File | Change |
|------|--------|
| `go.mod` / `go.sum` | OADP 1.4 dependency pins; `oadp-non-admin` removed |
| `cmd/non-admin/` | Removed (not available in 1.4) |
| `cmd/nabsl-request/` | Removed (not available in 1.4) |
| `cmd/shared/download.go` | Removed (was for non-admin download requests) |
| `Makefile` | `VERSION ?= oadp-1.4` |
| `Containerfile.download` | `OADP_VERSION=oadp-1.4` |

### Dependency comparison

| Component | `oadp-1.4` | `oadp-1.5` |
|-----------|---------------------------|------------|
| **Velero module** | `v1.14.1-rc.1` | `v1.16.0` |
| **openshift/velero replace** | `…20260526…ea5de9549ff4` (oadp-1.4 tip) | `…20260526…87a03c3d2c32` (oadp-1.5 tip) |
| **controller-runtime** | `v0.17.2` | `v0.19.3` |
| **k8s.io/client-go** (direct) | `v0.29.0` | `v0.33.11` |
| **k8s.io/api / apimachinery** | `v0.29.2` | `v0.33.11` |
| **oadp-non-admin** | removed | `aad3132759e1` (oadp-1.5) |
| **kopia replace** | `github.com/project-velero/kopia` | Inherited from oadp-non-admin @ oadp-1.5 |
| **Go** | `1.25.8` | `1.25.8` |
| **Version string** | `oadp-1.4` | `oadp-1.5` |

## Build and test

```bash
git checkout oadp-1.4
make build
make install ASSUME_DEFAULT=true
kubectl oadp version
```

Run the full dev test suite:

```bash
make test
make lint # optional
```

Local image build:

```bash
podman build -f Containerfile.download -t oadp-cli-oadp-1.4:local .
```

## Branch workflow

| Branch | Use |
|--------|-----|
| **`oadp-1.4`** | OADP 1.4 releases, OCP 4.17–4.18 |
| **`oadp-1.5`** | OADP 1.5 releases, OCP 4.19–4.21 |
| **`oadp-1.6`** | OADP 1.6 releases, OCP 4.22+ |
| **`oadp-dev`** | Development / next release |

Bugfixes for 1.4: branch from **`oadp-1.4`**, cherry-pick forward to **`oadp-1.5`** / **`oadp-1.6`** / **`oadp-dev`** as maintainers direct.

## Related repos

| Repo | Branch | Role |
|------|--------|------|
| [openshift/oadp-operator](https://github.com/openshift/oadp-operator) | `oadp-1.4` | Operator, Velero, DPA |
| **migtools/oadp-cli** | **`oadp-1.4`** | This plugin + download server |