How to test DirectPV Operator ‐ 2 - cniackz/public GitHub Wiki

Objective:

To show how to test directpv operator

Steps:

  1. Create cluster and install olm:
createcluster
operator-sdk olm install
  1. Build and push the image and the bundle:
cd ~/directpv/helm; make docker-build docker-push
cd ~/directpv/helm; make bundle bundle-build bundle-push
  1. Deploy the Operator and install DirectPV:
operator-sdk run bundle quay.io/cniackz4/directpv-operator-bundle:v4.0.7
kubectl apply -f ~/directpv/helm/my-directpv.yaml

Expected result:

  • Operator gets installed:
INFO[0015] Creating a File-Based Catalog of the bundle "quay.io/cniackz4/directpv-operator-bundle:v4.0.6" 
INFO[0016] Generated a valid File-Based Catalog         
INFO[0021] Created registry pod: quay-io-cniackz4-directpv-operator-bundle-v4-0-6 
INFO[0021] Created CatalogSource: directpv-operator-catalog 
INFO[0021] OperatorGroup "operator-sdk-og" created      
INFO[0021] Created Subscription: directpv-operator-v4-0-6-sub 
INFO[0038] Approved InstallPlan install-fl5qr for the Subscription: directpv-operator-v4-0-6-sub 
INFO[0038] Waiting for ClusterServiceVersion "default/directpv-operator.v4.0.6" to reach 'Succeeded' phase 
INFO[0038]   Waiting for ClusterServiceVersion "default/directpv-operator.v4.0.6" to appear 
INFO[0040]   Found ClusterServiceVersion "default/directpv-operator.v4.0.6" phase: Pending 
INFO[0042]   Found ClusterServiceVersion "default/directpv-operator.v4.0.6" phase: Installing 
INFO[0053]   Found ClusterServiceVersion "default/directpv-operator.v4.0.6" phase: Succeeded 
INFO[0053] OLM has successfully installed "directpv-operator.v4.0.6" 
  • Resources are deployed:

Screenshot 2023-08-16 at 2 23 41 PM