Improving the Guestbook Helm chart
The chart created in the previous section was able to successfully deploy the Guestbook application. However, as is the case with any type of software, the Helm chart can always be improved. In this section, we will focus on the following two features that will improve the
- Life cycle hooks to back up and restore the Redis database
- Input validation to ensure only valid values are provided
Let's focus first on adding life cycle hooks.
Creating pre-upgrade and pre-rollback life cycle hooks
- The first hook will occur in the
pre-upgradelife cycle phase. This phase takes place immediately after the
helm upgradecommand is run, but before any Kubernetes resources become modified. This hook will be used to take a data snapshot of the Redis database before performing the upgrade, ensuring that the database is backed up in case the upgrade...