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
14 changes: 14 additions & 0 deletions .cursor/prompts/deploy-dcm.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Deploy the full DCM stack for E2E testing using `scripts/deploy-dcm.sh`.
2. **For KubeVirt provider**: `oc` (OCP cluster with CNV installed)
3. **For k8s container provider**: `oc` or `kubectl` (any Kubernetes cluster)
4. **For k8s storage provider**: `oc` or `kubectl` (any Kubernetes cluster)
5. **For k8s network provider**: `oc` or `kubectl` (any Kubernetes cluster)

## Commands

Expand Down Expand Up @@ -63,6 +64,17 @@ Deploy the full DCM stack for E2E testing using `scripts/deploy-dcm.sh`.
./scripts/deploy-dcm.sh --k8s-storage-service-provider --kubeconfig ~/.kube/config
```

### Deploy with k8s Network Service Provider
```bash
# Uses utilities compose override (host port 8090) until control-plane adds a profile
./scripts/deploy-dcm.sh --k8s-network-service-provider --kubeconfig ~/.kube/config

# Optional dedicated namespace for network Services
./scripts/deploy-dcm.sh --k8s-network-service-provider \
--kubeconfig ~/.kube/config \
--k8s-network-namespace dcm-network-test
```

### Deploy with KubeVirt Service Provider
```bash
./scripts/deploy-dcm.sh --kubevirt-service-provider --kubeconfig ~/.kube/config
Expand Down Expand Up @@ -104,6 +116,8 @@ When any service provider is enabled, the script resolves cluster access in this
| `KUBEVIRT_VM_NAMESPACE` | `--kubevirt-vm-namespace` |
| `K8S_CONTAINER_SP_NAMESPACE` | `--k8s-container-namespace` |
| `K8S_STORAGE_SP_NAMESPACE` | `--k8s-storage-namespace` |
| `K8S_NETWORK_SP_NAMESPACE` | `--k8s-network-namespace` |
| `K8S_NETWORK_SERVICE_PROVIDER_VERSION` | (image tag for network SP compose override) |
| `OPENSHIFT_API` | `--cluster-api` |
| `OPENSHIFT_USERNAME` | `--cluster-username` |
| `OPENSHIFT_PASSWORD` | `--cluster-password` |
Expand Down
6 changes: 4 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,11 @@ Service providers are defined declaratively in `providers/*.conf` files. Each co

**To add a new provider:** drop a `.conf` file in `providers/` and (if needed) add a validation hook function in `deploy-dcm.sh`. No other changes to the deploy script are required — flags, usage, arg parsing, and env exports are all generated from the registry.

Current providers: `kubevirt`, `k8s-container`, `k8s-storage`, `acm-cluster`, `three-tier-app-demo`, `three-tier-app-demo-2`, `three-tier-app-demo-3`.
Current providers: `kubevirt`, `k8s-container`, `k8s-storage`, `k8s-network`, `acm-cluster`, `three-tier-app-demo`, `three-tier-app-demo-2`, `three-tier-app-demo-3`.

Host ports published for direct SP access (compose overrides): KubeVirt **8081**, k8s-container **8082**, ACM cluster **8083**, three-tier **8084**–**8086**, k8s-container-2/3 **8087**–**8088**, k8s-storage **8089**.
Host ports published for direct SP access (compose overrides): KubeVirt **8081**, k8s-container **8082**, ACM cluster **8083**, three-tier **8084**–**8086**, k8s-container-2/3 **8087**–**8088**, k8s-storage **8089**, k8s-network **8090**.

**k8s-network:** Not yet in control-plane `compose.yaml`; `providers/k8s-network.conf` uses `tests/compose-k8s-network-sp.yaml` as a full-service override. Enable with `--k8s-network-service-provider` or `--all-service-providers`. Image tag via `K8S_NETWORK_SERVICE_PROVIDER_VERSION` (included in `VERSION_ENV_VARS`).

### Script Structure

Expand Down
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,20 @@ Both deploy mode and `--running-versions` produce a `dcm-versions.json` mapping
# 5. Deploy with the k8s storage service provider
./scripts/deploy-dcm.sh --k8s-storage-service-provider --kubeconfig ~/.kube/config

# 6. Deploy with KubeVirt + explicit kubeconfig
# 6. Deploy with the k8s network service provider (utilities compose override until control-plane profile lands)
./scripts/deploy-dcm.sh --k8s-network-service-provider --kubeconfig ~/.kube/config

# 7. Deploy with KubeVirt + explicit kubeconfig
./scripts/deploy-dcm.sh --kubevirt-service-provider --kubeconfig ~/.kube/config

# 7. Deploy all providers, logging in via oc
# 8. Deploy all providers, logging in via oc
./scripts/deploy-dcm.sh --all-service-providers \
--cluster-api https://api.cluster.example.com --cluster-password secret

# 8. Deploy ACM cluster provider (install ACM first if needed)
# 9. Deploy ACM cluster provider (install ACM first if needed)
./scripts/deploy-dcm.sh --acm-cluster-service-provider --deploy-acm --kubeconfig ~/.kube/config

# 9. Tear down when done
# 10. Tear down when done
./scripts/deploy-dcm.sh --tear-down
```

Expand Down Expand Up @@ -138,6 +141,7 @@ make help
| `DCM_GATEWAY_URL` | `http://localhost:8080/api/v1alpha1` | Control plane API base URL |
| `DCM_CONTAINER_SP_URL` | `http://localhost:8082/api/v1alpha1` | Container SP direct URL (requires published port) |
| `DCM_STORAGE_SP_URL` | `http://localhost:8089/api/v1alpha1` | Storage SP direct URL (requires published port) |
| `DCM_NETWORK_SP_URL` | `http://localhost:8090/api/v1alpha1` | Network SP direct URL (requires published port) |
| `DCM_ACM_CLUSTER_SP_URL` | `http://localhost:8083/api/v1alpha1` | ACM Cluster SP direct URL (requires published port) |
| `DCM_NATS_URL` | `nats://localhost:4222` | NATS server URL for status event tests |
| `DCM_CLI_PATH` | (auto-resolved) | Path to `dcm` CLI binary |
Expand All @@ -159,6 +163,7 @@ The test harness (`tests/run-e2e.sh`) supports additional flags for fine-grained
# Service provider tests
./tests/run-e2e.sh --k8s-container-service-provider --cluster-api https://api.example.com:6443
./tests/run-e2e.sh --k8s-storage-service-provider --kubeconfig ~/.kube/config
./tests/run-e2e.sh --k8s-network-service-provider --kubeconfig ~/.kube/config
./tests/run-e2e.sh --skip-deploy --label-filter "sp && container"

# ACM cluster SP tests
Expand Down
26 changes: 26 additions & 0 deletions providers/k8s-network.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# shellcheck shell=bash
# Kubernetes Network Service Provider
Comment thread
qodo-code-review[bot] marked this conversation as resolved.
# Works with any Kubernetes cluster (OCP or upstream)
#
# Note: k8s-network-service-provider is not yet in control-plane compose.yaml.
# The compose override defines the full service until upstream adds a profile.
# --all-service-providers enables this SP too; network CRUD may still be incomplete.

PROVIDER_LABEL="k8s-network"
PROVIDER_FLAG="k8s-network-service-provider"
PROVIDER_DESCRIPTION="Enable the k8s network service provider"
Comment thread
qodo-code-review[bot] marked this conversation as resolved.

COMPOSE_PROFILE=""
COMPOSE_OVERRIDE="tests/compose-k8s-network-sp.yaml"

CLI_REQUIREMENT="oc-or-kubectl"

NAMESPACE_FLAG="k8s-network-namespace"
NAMESPACE_ENV="K8S_NETWORK_SP_NAMESPACE"
NAMESPACE_DEFAULT="default"

KUBECONFIG_EXPORT="K8S_NETWORK_SP_KUBECONFIG"
NAMESPACE_EXPORT="K8S_NETWORK_SP_NAMESPACE"

# Same prerequisite check as container/storage SP (namespace exists on cluster)
VALIDATE_HOOK="validate_k8s_container_provider"
1 change: 1 addition & 0 deletions scripts/deploy-dcm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ readonly VERSION_ENV_VARS=(
KUBEVIRT_SERVICE_PROVIDER_VERSION
K8S_CONTAINER_SERVICE_PROVIDER_VERSION
K8S_STORAGE_SERVICE_PROVIDER_VERSION
K8S_NETWORK_SERVICE_PROVIDER_VERSION
ACM_CLUSTER_SERVICE_PROVIDER_VERSION
THREE_TIER_DEMO_SERVICE_PROVIDER_VERSION
)
Expand Down
Loading
Loading