Conversation
Signed-off-by: Manuel Vergara <manuel@vergaracarmona.es>
| @@ -0,0 +1,39 @@ | |||
| # wp-deploy.yaml | |||
| apiVersion: apps/v1 | |||
| kind: Deployment | |||
There was a problem hiding this comment.
This should be a statefulset @manuelver : https://kubernetes.io/blog/2016/12/statefulset-run-scale-stateful-applications-in-kubernetes/
| name: wp-secrets | ||
| type: Opaque | ||
| data: | ||
| root-password: QzBudHI0c2VuNA== |
There was a problem hiding this comment.
The secret is not really encrypted, shouldn't be stored in the repo. You could use a service like aws parameter store, or sops to really encrypt the secret in the code.
| - containerPort: 8080 | ||
| volumeMounts: | ||
| - name: wordpress-persistent-storage | ||
| mountPath: /var/www/html |
There was a problem hiding this comment.
I think the mount path should be the folder with the files that will be generated during the normal operation of the site, in specific the wp-content/uploads path right?, not all the html folder, that will come with the docker image
https://www.theistudio.com/where-are-wordpress-files-stored/#h-wordpress-file-locations
There was a problem hiding this comment.
It would be more correct from wp-content to add the layout, theme and so on. But yes, from the html directory would be too much.
| volumes: | ||
| - name: wordpress-persistent-storage | ||
| persistentVolumeClaim: | ||
| claimName: wp-pv-claim |
There was a problem hiding this comment.
This disk should be a shared storage, like aws efs or Azure Fileshare. To be able to mount it in multiple pod replicas
This time I am already sure to create the branch from the same origin repo.
I add a different exercise in activity 2 to helm where I separate the wordpress release from the pvc release. I think that way I keep the volumes to use the pvc independently even if the wp release is deleted.