-
Notifications
You must be signed in to change notification settings - Fork 4
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
another helm exercise #128
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Manuel Vergara <[email protected]>
@@ -0,0 +1,39 @@ | |||
# wp-deploy.yaml | |||
apiVersion: apps/v1 | |||
kind: Deployment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.