vardius / go-api-boilerplate

Go Server/API boilerplate using best practices DDD CQRS ES gRPC
https://go-api-boilerplate.local
MIT License
917 stars 135 forks source link

Invalid `spec.hostPath.path` #72

Closed beautyfree closed 3 years ago

beautyfree commented 3 years ago

Error: failed to create resource: PersistentVolume "go-api-boilerplate-app" is invalid: spec.hostPath.path: Required value

vardius commented 3 years ago

could you share your values file ? its mysql part i think. if you havent changed anything can you please share your versions for k8s etc?

possibly default mysql volume host path does not exist, might want to check out options and tweak to your needs

beautyfree commented 3 years ago

@vardius i didn't change anything and my values file same as https://github.com/vardius/go-api-boilerplate/blob/master/helm/app/values.yaml#L111

vardius commented 3 years ago

what is your system version and docker version?

beautyfree commented 3 years ago

@vardius OS: macOS Big Sur 11.0.1 (20B50) Docker Desktop: 20.10.0, build 7287ab3 Kubernetes: Client v1.19.3, Server v1.20.0

vardius commented 3 years ago

I will have a look on it as soon as i get a chance to get to my computer.

In the mean time you can research mysql helm chart options and play around with persistent volume settings.

https://github.com/helm/charts/tree/master/stable/mysql#persistence

vardius commented 3 years ago

let me know where you at with solving your issue, might be that we should update mysql chart used here as the one currently used is deprecated if I am reading this correctly. https://github.com/helm/charts/tree/master/stable/mysql#deprecation-notice

vardius commented 3 years ago

Try updating mysql values as follow

mysql:
  existingSecret: mysql-secret
  mysqlUser: goapiboilerplate
+  hostPath: /mnt/data

verify that the directory /mnt/data exists on the server if error persists

beautyfree commented 3 years ago

@vardius thank you it works!