update deployments for var and secrets

This commit is contained in:
gregory hendrickson
2023-01-26 01:45:18 -08:00
parent 1b7758ed6b
commit d314c84b67
8 changed files with 101 additions and 34 deletions

View File

@@ -38,4 +38,5 @@ You can also manage and update the variables in the configMap and Secret using k
It's important to note that configMap and Secret are not the only way to use variables in Kubernetes, you can also use other tools like Helm or Kustomize.
#
# ghost-blog-deployment.yaml
In this example, the ghost-blog-deployment.yaml file has been updated to include the use of configMapKeyRef and secretKeyRef to reference variables for the url and database connection details respectively. The configMap and secrets resources must be created separately and referenced here. Additionally, the database__client and all database__connection__* keys are using secrets to manage the sensitive data. I've also defined resources limits and requests for the ghost-blog container. volumeMounts and volumes sections are added to the deployment.yaml file for the persistent volume claim for ghost-data.