Skip to content

mate-academy/devops_todolist_kubernetes_task_12_helm_charts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django ToDo list

This is a to-do list web application with the basic features of most web apps, i.e., accounts/login, API, and interactive UI. To do this task, you will need:

Explore

Try it out by installing the requirements (the following commands work only with Python 3.8 and higher, due to Django 4):

pip install -r requirements.txt

Create a database schema:

python manage.py migrate

And then start the server (default is http://localhost:8000):

python manage.py runserver

You can now browse the API or start on the landing page.

Task

Create a Kubernetes manifest for a pod that will contain a ToDo app container:

  1. Fork this repository.

  2. Use kind to spin up a cluster from a cluster.yml configuration file.

  3. Inspect Nodes for Labels and Taints

  4. Taint nodes labeled with app=mysql with app=mysql:NoSchedule

  5. Create a helm chart named todoapp inside a helm-chart directory

  6. todoapp helm chart requirements:

    1. Namespace name should be controlled from a values.yaml file
    2. Use .Chart.Name as a prefix for all resources names
    3. Secrets should be controlled from a values.yaml file
    4. Secrets data should be popualted by a range function
    5. Inside the deployment use range to map secrets as environment variables
    6. Resources requests and limits should controlled from a values.yaml file
    7. RollingUpdate parameters should be controlled from a values.yaml file
    8. Image repository and tag should be controlled from a values.yaml file
    9. Deployment node affinity parameters should be controlled from a values.yaml file (key and values)
    10. hpa min and max replicas should be controlled from a values.yaml file
    11. hpa average CPU and Memory utilization should be controlled from a values.yaml file
    12. pv capacity should be controlled from a values.yaml file
    13. pvc requests storage should be controlled from a values.yaml file
    14. Service Account Name inside both Deployment and all rbac objects should be controlled from a values.yaml file
  7. Create a sub-chart called mysql inside a charts directory of the todoapp helm chart

  8. mysql helm chart requirements:

    1. Namespace name should be controlled from a values.yaml file
    2. Use .Chart.Name as a prefix for all resource names
    3. Secrets should be controlled from a values.yaml file
    4. Secrets data should be populated by a range function
    5. StateFulSet's Replicas should be controlled from a values.yaml file
    6. Image repository and tag should be controlled from a values.yaml file
    7. pvc requests storage should be controlled from a values.yaml file
    8. Affinity and Toleration parameters should be controlled from a values.yaml file
    9. Resource requests and limits should controlled from a values.yaml file
  9. Add explicit dependencies between todoapp and mysql charts

    1. Inside the Chart.yaml file of todoapp chart, add lines
      dependencies:
      - name: mysql
      
  10. bootstrap.sh should contain all commands to deploy prerequisites and the todoapp helm chart

  11. Deploy the helm chart to your kind cluster

  12. Run the command kubectl get all,cm,secret,ing -A and put the output in a file called output.log in the root of the repository

  13. Create the INSTRUCTION.md file with instructions on how to validate the changes

  14. Create PR with your changes and attach it for validation on a platform.