Skip to content

Latest commit

 

History

History
92 lines (70 loc) · 1.96 KB

README.md

File metadata and controls

92 lines (70 loc) · 1.96 KB

Local development

Minikube

Start minikube

minikube start --cpus=8 --memory=10g
minikube addons enable ingress

Setup CDRs

mvn clean package -DskipTests
kubectl apply -f target/kubernetes/windups.windup.jboss.org-v1.yml

Start server in dev mode

mvn compile quarkus:dev

Instantiate Windup

kubectl apply -f scripts/windup.yaml

At this point the container images will be generated by the operator.

Test Operator in OCP

Create operator container:

mvn clean package -DskipTests \
-Dquarkus.native.container-build=true \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=false \
-Dquarkus.container-image.registry=quay.io \
-Dquarkus.container-image.group=$USER \
-Dquarkus.container-image.name=windup-operator \
-Dquarkus.operator-sdk.bundle.package-name=windup-operator \
-Dquarkus.operator-sdk.bundle.channels=alpha \
-Dquarkus.application.version=test \
-P native
podman push quay.io/$USER/windup-operator:test

Enrich bundle with cluster permissions (util only if generating a catalog for OCP)

groovy scripts/enrichCSV.groovy target/bundle/windup-operator/manifests/windup-operator.clusterserviceversion.yaml

Create bundle:

BUNDLE_IMAGE=quay.io/$USER/windup-operator-bundle:test
podman build -t $BUNDLE_IMAGE -f target/bundle/windup-operator/bundle.Dockerfile target/bundle/windup-operator
podman push $BUNDLE_IMAGE

Create catalog image:

CATALOG_IMAGE=quay.io/$USER/windup-operator-catalog:test
opm index add \
  --bundles $BUNDLE_IMAGE \
  --tag $CATALOG_IMAGE \
  --build-tool podman
podman push $CATALOG_IMAGE

Create catalog:

cat <<EOF | kubectl apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: windup-catalog-source
  namespace: openshift-marketplace
spec:
  sourceType: grpc
  image: $CATALOG_IMAGE
EOF

At this point you can see the Operator in the marketplace of OCP ready for you to test it.