Skip to content

ubuntu backup page

Cesar Celis Hernandez edited this page Jan 8, 2024 · 2 revisions
  • Push images, this step is needed just once, so keep it as is for now unless it is really needed then create new images:
cd ~
rm -rf ~/directpv/
git clone [email protected]:minio/directpv.git
cd ~/directpv/operator
docker buildx build --platform linux/amd64 -t quay.io/cniackz4/directpv-operator:4.0.8 . --push
operator-sdk generate kustomize manifests -q --package minio-directpv-operator
(cd config/manager && kustomize edit set image controller=quay.io/cniackz4/directpv-operator:4.0.8)
kustomize build config/manifests | operator-sdk generate bundle -q --version 4.0.8 --package minio-directpv-operator --use-image-digests
operator-sdk bundle validate ./bundle
docker build -f bundle.Dockerfile -t quay.io/cniackz4/directpv-operator-bundle:v4.0.8 . --push
cd ~
rm -rf ~/directpv/
git clone [email protected]:minio/directpv.git
cd ~/directpv/operator
docker buildx build --platform linux/amd64 -t quay.io/cniackz4/directpv-operator:4.0.10 . --push
operator-sdk generate kustomize manifests -q --package minio-directpv-operator
(cd config/manager && kustomize edit set image controller=quay.io/cniackz4/directpv-operator:4.0.10)
kustomize build config/manifests | operator-sdk generate bundle -q --version 4.0.10 --package minio-directpv-operator --use-image-digests
operator-sdk bundle validate ./bundle
docker build -f bundle.Dockerfile -t quay.io/cniackz4/directpv-operator-bundle:v4.0.10 . --push
  • Deploy the Operator:
oc login -u kubeadmin https://api.crc.testing:6443
operator-sdk run bundle quay.io/cniackz4/directpv-operator-bundle:v4.0.8
echo "a"
echo "b"
oc login --token=sha256~fAdgUgq5taGFHP-iZDuYvTNgY2dVmLUK-650-SjKJzM --server=https://api.directpv.directpv.com:6443 --insecure-skip-tls-verify=true
operator-sdk run bundle quay.io/cniackz4/directpv-operator-bundle:v4.0.10
echo "a"
echo "b"

Result:

ccelis@asus:~$ oc login -u kubeadmin https://api.crc.testing:6443
Logged into "https://api.crc.testing:6443" as "kubeadmin" using existing credentials.

You have access to 65 projects, the list has been suppressed. You can list all projects with 'oc projects'

Using project "default".
ccelis@asus:~$ operator-sdk run bundle quay.io/cniackz4/directpv-operator-bundle:v4.0.8
INFO[0009] Creating a File-Based Catalog of the bundle "quay.io/cniackz4/directpv-operator-bundle:v4.0.8" 
INFO[0009] Generated a valid File-Based Catalog         
INFO[0017] Created registry pod: quay-io-cniackz4-directpv-operator-bundle-v4-0-8 
INFO[0017] Created CatalogSource: minio-directpv-operator-catalog 
INFO[0017] OperatorGroup "operator-sdk-og" created      
INFO[0017] Created Subscription: minio-directpv-operator-v4-0-8-sub 
INFO[0025] Approved InstallPlan install-7pc24 for the Subscription: minio-directpv-operator-v4-0-8-sub 
INFO[0025] Waiting for ClusterServiceVersion "default/minio-directpv-operator.v4.0.8" to reach 'Succeeded' phase 
INFO[0025]   Waiting for ClusterServiceVersion "default/minio-directpv-operator.v4.0.8" to appear 
INFO[0042]   Found ClusterServiceVersion "default/minio-directpv-operator.v4.0.8" phase: Pending 
INFO[0044]   Found ClusterServiceVersion "default/minio-directpv-operator.v4.0.8" phase: Installing 
INFO[0065]   Found ClusterServiceVersion "default/minio-directpv-operator.v4.0.8" phase: Succeeded 
INFO[0065] OLM has successfully installed "minio-directpv-operator.v4.0.8" 
Cesars-MacBook-Pro:operator cniackz$ oc login --token=sha256~fAdgUgq5taGFHP-iZDuYvTNgY2dVmLUK-650-SjKJzM --server=https://api.directpv.directpv.com:6443 --insecure-skip-tls-verify=true
WARNING: Using insecure TLS client config. Setting this option is not supported!

Logged into "https://api.directpv.directpv.com:6443" as "kube:admin" using the token provided.

You have access to 74 projects, the list has been suppressed. You can list all projects with 'oc projects'

Using project "default".
Cesars-MacBook-Pro:operator cniackz$ operator-sdk run bundle quay.io/cniackz4/directpv-operator-bundle:v4.0.10
INFO[0015] Creating a File-Based Catalog of the bundle "quay.io/cniackz4/directpv-operator-bundle:v4.0.10" 
INFO[0017] Generated a valid File-Based Catalog         
INFO[0023] Created registry pod: quay-io-cniackz4-directpv-operator-bundle-v4-0-10 
INFO[0023] Created CatalogSource: minio-directpv-operator-catalog 
INFO[0023] OperatorGroup "operator-sdk-og" created      
INFO[0023] Created Subscription: minio-directpv-operator-v4-0-10-sub 
INFO[0035] Approved InstallPlan install-fxlkq for the Subscription: minio-directpv-operator-v4-0-10-sub 
INFO[0035] Waiting for ClusterServiceVersion "default/minio-directpv-operator.v4.0.10" to reach 'Succeeded' phase 
INFO[0035]   Waiting for ClusterServiceVersion "default/minio-directpv-operator.v4.0.10" to appear 
INFO[0038]   Found ClusterServiceVersion "default/minio-directpv-operator.v4.0.10" phase: Pending 
INFO[0039]   Found ClusterServiceVersion "default/minio-directpv-operator.v4.0.10" phase: Installing 
INFO[0060]   Found ClusterServiceVersion "default/minio-directpv-operator.v4.0.10" phase: Succeeded 
INFO[0060] OLM has successfully installed "minio-directpv-operator.v4.0.10"
Clone this wiki locally