bitpoke / stack

Open-Source WordPress Infrastructure on Kubernetes
https://www.bitpoke.io/stack
Apache License 2.0
165 stars 30 forks source link

Invalid CRDs #101

Closed MatheoAtche closed 4 years ago

MatheoAtche commented 4 years ago

What happened:

I am using kubernetes v1.18.2 (client and server) on minikube v1.10.1 and, following the docs, I tried to run :

kubectl apply -f https://raw.githubusercontent.com/presslabs/stack/master/deploy/manifests/00-crds.yaml

but this is what happened :

customresourcedefinition.apiextensions.k8s.io/mysqlbackups.mysql.presslabs.org 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
customresourcedefinition.apiextensions.k8s.io/alertmanagers.monitoring.coreos.com created
customresourcedefinition.apiextensions.k8s.io/podmonitors.monitoring.coreos.com created
customresourcedefinition.apiextensions.k8s.io/prometheuses.monitoring.coreos.com created
customresourcedefinition.apiextensions.k8s.io/prometheusrules.monitoring.coreos.com created
customresourcedefinition.apiextensions.k8s.io/servicemonitors.monitoring.coreos.com created
The CustomResourceDefinition "wordpresses.wordpress.presslabs.org" is invalid: 
* spec.validation.openAPIV3Schema.properties[spec].properties[initContainers].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property
* spec.validation.openAPIV3Schema.properties[spec].properties[sidecars].items.properties[ports].items.properties[protocol].default: Required value: this property is in x-kubernetes-list-map-keys, so it must have a default or be a required property

So a majority of the CRDs where created but not the wordpress one, hence when I deployed the stack with Helm, the Wordpress Operator did not work (Error and CrashLoopBackoff of the container)

What you expected to happen:

I expected the CRDs to be installed correctly.

How to reproduce it (as minimally and precisely as possible):

I think if you use the same versions of minikube and kubernetes you'll have the same bug. (I tried on minikube using virtualbox and also using Docker as driver)

Anything else?:

I think there is also a small issue with the Helm Chart, the wordpress operator version is noted 0.9.1 but on the repo this tag does not exist.

AMecea commented 4 years ago

I've fixed today the issue regarding missing tag for wordpress-operator image.

Try using the CRDs of version v0.9.1: https://github.com/presslabs/stack/raw/v0.9.1/deploy/manifests/00-crds.yaml because the manifests on the master branch are broken after merging #100, I'm working to fix them.

Also, Stack is not tested, yet, with k8s version 1.18, only on 1.15.

MatheoAtche commented 4 years ago

Thanks for your answer !

I'll try this tomorrow.

MatheoAtche commented 4 years ago

It worked fine with kubernetes 1.15, but I got the same error with k8s 1.18 and the version of the CRDs you gave.

Thanks again for your answer and I'm closing this issue since I managed to make the stack work :smile: