Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade operator-sdk to v1.31+ #309

Closed
guicassolato opened this issue Nov 16, 2023 · 0 comments · Fixed by #319
Closed

Upgrade operator-sdk to v1.31+ #309

guicassolato opened this issue Nov 16, 2023 · 0 comments · Fixed by #319
Assignees
Labels
good first issue Good for newcomers kind/bug Something isn't working size/small
Milestone

Comments

@guicassolato
Copy link
Contributor

Operator SDK v1.28 has a known bug with newer versions of Kubernetes, recently fixed in v1.31.0.

Steps to reproduce

Make sure you have the versions of kind (v0.20.0) and operator-sdk (v1.28.1) currently pointed in the Makefile:

rm -rf bin

Setup a local cluster with OLM:

make local-cluster-setup install-olm

Error:

/Library/Developer/CommandLineTools/usr/bin/make kind-delete-cluster
go: creating new go.mod: module tmp
Downloading sigs.k8s.io/[email protected]
/Users/guilherme.cassolato/Workspace/go/src/github.com/kuadrant/kuadrant-operator/bin/kind delete cluster --name kuadrant-local
Deleting cluster "kuadrant-local" ...
/Library/Developer/CommandLineTools/usr/bin/make kind-create-cluster
/Users/guilherme.cassolato/Workspace/go/src/github.com/kuadrant/kuadrant-operator/bin/kind create cluster --name kuadrant-local --config utils/kind-cluster.yaml
Creating cluster "kuadrant-local" ...
 ✓ Ensuring node image (kindest/node:v1.27.3) 🖼
 ✓ Preparing nodes 📦
 ✓ Writing configuration 📜
 ✓ Starting control-plane 🕹️
 ✓ Installing CNI 🔌
 ✓ Installing StorageClass 💾
Set kubectl context to "kind-kuadrant-local"
You can now use your cluster with:

kubectl cluster-info --context kind-kuadrant-local

Have a nice day! 👋
/Library/Developer/CommandLineTools/usr/bin/make namespace
kubectl create namespace kuadrant-system
namespace/kuadrant-system created
/Library/Developer/CommandLineTools/usr/bin/make gateway-api-install
go: creating new go.mod: module tmp
Downloading sigs.k8s.io/kustomize/kustomize/[email protected]
/Users/guilherme.cassolato/Workspace/go/src/github.com/kuadrant/kuadrant-operator/bin/kustomize build config/dependencies/gateway-api | kubectl apply -f -
customresourcedefinition.apiextensions.k8s.io/gatewayclasses.gateway.networking.k8s.io created
customresourcedefinition.apiextensions.k8s.io/gateways.gateway.networking.k8s.io created
customresourcedefinition.apiextensions.k8s.io/httproutes.gateway.networking.k8s.io created
customresourcedefinition.apiextensions.k8s.io/referencegrants.gateway.networking.k8s.io created
/Library/Developer/CommandLineTools/usr/bin/make istio-install
mkdir -p /Users/guilherme.cassolato/ws/go/src/github.com/kuadrant/kuadrant-operator/bin
cd /var/folders/3p/cjv1s1f55v527j4404gmjx080000gn/T/tmp.vA1lPaT9We; curl -sSL https://istio.io/downloadIstio | ISTIO_VERSION=1.17.2 sh -

Downloading istio-1.17.2 from https://github.com/istio/istio/releases/download/1.17.2/istio-1.17.2-osx-arm64.tar.gz ...



Istio 1.17.2 Download Complete!

Istio has been successfully downloaded into the istio-1.17.2 folder on your system.

Next Steps:
See https://istio.io/latest/docs/setup/install/ to add Istio to your Kubernetes cluster.

To configure the istioctl client tool for your workstation,
add the /var/folders/3p/cjv1s1f55v527j4404gmjx080000gn/T/tmp.vA1lPaT9We/istio-1.17.2/bin directory to your environment path variable with:
	 export PATH="$PATH:/var/folders/3p/cjv1s1f55v527j4404gmjx080000gn/T/tmp.vA1lPaT9We/istio-1.17.2/bin"

Begin the Istio pre-installation check by running:
	 istioctl x precheck

Need more information? Visit https://istio.io/latest/docs/setup/install/
cp /var/folders/3p/cjv1s1f55v527j4404gmjx080000gn/T/tmp.vA1lPaT9We/istio-1.17.2/bin/istioctl /Users/guilherme.cassolato/ws/go/src/github.com/kuadrant/kuadrant-operator/bin/istioctl
rm -rf /var/folders/3p/cjv1s1f55v527j4404gmjx080000gn/T/tmp.vA1lPaT9We
/Users/guilherme.cassolato/ws/go/src/github.com/kuadrant/kuadrant-operator/bin/istioctl operator init
Installing operator controller in namespace: istio-operator using image: docker.io/istio/operator:1.17.2
Operator controller will watch namespaces: istio-system
✔ Istio operator installed
✔ Installation complete
kubectl apply -f config/dependencies/istio/istio-operator.yaml
istiooperator.install.istio.io/istiocontrolplane created
/Library/Developer/CommandLineTools/usr/bin/make install-cert-manager
/Users/guilherme.cassolato/Workspace/go/src/github.com/kuadrant/kuadrant-operator/bin/kustomize build config/dependencies/cert-manager | kubectl apply -f -
namespace/cert-manager created
customresourcedefinition.apiextensions.k8s.io/certificaterequests.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/certificates.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/challenges.acme.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/clusterissuers.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/issuers.cert-manager.io created
customresourcedefinition.apiextensions.k8s.io/orders.acme.cert-manager.io created
serviceaccount/cert-manager created
serviceaccount/cert-manager-cainjector created
serviceaccount/cert-manager-webhook created
role.rbac.authorization.k8s.io/cert-manager-webhook:dynamic-serving created
role.rbac.authorization.k8s.io/cert-manager-cainjector:leaderelection created
role.rbac.authorization.k8s.io/cert-manager:leaderelection created
clusterrole.rbac.authorization.k8s.io/cert-manager-cainjector created
clusterrole.rbac.authorization.k8s.io/cert-manager-controller-approve:cert-manager-io created
clusterrole.rbac.authorization.k8s.io/cert-manager-controller-certificates created
clusterrole.rbac.authorization.k8s.io/cert-manager-controller-certificatesigningrequests created
clusterrole.rbac.authorization.k8s.io/cert-manager-controller-challenges created
clusterrole.rbac.authorization.k8s.io/cert-manager-controller-clusterissuers created
clusterrole.rbac.authorization.k8s.io/cert-manager-controller-ingress-shim created
clusterrole.rbac.authorization.k8s.io/cert-manager-controller-issuers created
clusterrole.rbac.authorization.k8s.io/cert-manager-controller-orders created
clusterrole.rbac.authorization.k8s.io/cert-manager-edit created
clusterrole.rbac.authorization.k8s.io/cert-manager-view created
clusterrole.rbac.authorization.k8s.io/cert-manager-webhook:subjectaccessreviews created
rolebinding.rbac.authorization.k8s.io/cert-manager-webhook:dynamic-serving created
rolebinding.rbac.authorization.k8s.io/cert-manager-cainjector:leaderelection created
rolebinding.rbac.authorization.k8s.io/cert-manager:leaderelection created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-cainjector created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-approve:cert-manager-io created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-certificates created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-certificatesigningrequests created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-challenges created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-clusterissuers created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-ingress-shim created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-issuers created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-controller-orders created
clusterrolebinding.rbac.authorization.k8s.io/cert-manager-webhook:subjectaccessreviews created
configmap/cert-manager-webhook created
service/cert-manager created
service/cert-manager-webhook created
deployment.apps/cert-manager created
deployment.apps/cert-manager-cainjector created
deployment.apps/cert-manager-webhook created
mutatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook created
validatingwebhookconfiguration.admissionregistration.k8s.io/cert-manager-webhook created
kubectl -n cert-manager wait --timeout=300s --for=condition=Available deployments --all
deployment.apps/cert-manager condition met
deployment.apps/cert-manager-cainjector condition met
deployment.apps/cert-manager-webhook condition met
/Library/Developer/CommandLineTools/usr/bin/make deploy-gateway
/Users/guilherme.cassolato/Workspace/go/src/github.com/kuadrant/kuadrant-operator/bin/kustomize build config/dependencies/gateway-api/gateway | kubectl apply -f -
gateway.gateway.networking.k8s.io/istio-ingressgateway created
./utils/install-operator-sdk.sh /Users/guilherme.cassolato/Workspace/go/src/github.com/kuadrant/kuadrant-operator/bin/operator-sdk v1.28.1
Disabling ipv6 for gpg on mac
Downloading https://github.com/operator-framework/operator-sdk/releases/download/v1.28.1/operator-sdk_darwin_arm64

gpg: key 052996E2A20B5C7E: "Operator SDK (release) <[email protected]>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1


gpg: assuming signed data in 'checksums.txt'
gpg: Signature made vie 28 abr 20:42:04 2023 CEST
gpg:                using RSA key 8613DB87A5BA825EF3FD0EBE2A859D08BF9886DB
gpg: Good signature from "Operator SDK (release) <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 3B2F 1481 D146 2380 80B3  46BB 0529 96E2 A20B 5C7E
     Subkey fingerprint: 8613 DB87 A5BA 825E F3FD  0EBE 2A85 9D08 BF98 86DB
operator-sdk_darwin_arm64: OK
/Users/guilherme.cassolato/Workspace/go/src/github.com/kuadrant/kuadrant-operator/bin/operator-sdk olm install
INFO[0000] Fetching CRDs for version "latest"
INFO[0000] Fetching resources for resolved version "latest"
INFO[0001] Creating CRDs and resources
INFO[0001]   Creating CustomResourceDefinition "catalogsources.operators.coreos.com"
INFO[0001]   Creating CustomResourceDefinition "clusterserviceversions.operators.coreos.com"
INFO[0001]   Creating CustomResourceDefinition "installplans.operators.coreos.com"
INFO[0001]   Creating CustomResourceDefinition "olmconfigs.operators.coreos.com"
INFO[0001]   Creating CustomResourceDefinition "operatorconditions.operators.coreos.com"
INFO[0001]   Creating CustomResourceDefinition "operatorgroups.operators.coreos.com"
INFO[0001]   Creating CustomResourceDefinition "operators.operators.coreos.com"
INFO[0001]   Creating CustomResourceDefinition "subscriptions.operators.coreos.com"
INFO[0001]   Creating Namespace "olm"
INFO[0001]   Creating Namespace "operators"
INFO[0001]   Creating ServiceAccount "olm/olm-operator-serviceaccount"
INFO[0001]   Creating ClusterRole "system:controller:operator-lifecycle-manager"
INFO[0001]   Creating ClusterRoleBinding "olm-operator-binding-olm"
INFO[0001]   Creating OLMConfig "cluster"
FATA[0001] Failed to install OLM version "latest": failed to create CRDs and resources: no matches for kind "OLMConfig" in version "operators.coreos.com/v1"
make: *** [install-olm] Error 1

Expected behavior

Installation finished successfully.

Known solution

Update operator-sdk to v1.31+ in the Makefile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers kind/bug Something isn't working size/small
Projects
Archived in project
Status: To test
Development

Successfully merging a pull request may close this issue.

2 participants