mywebapp

My Web App - Helm Chart Deployment

This repository contains a Helm chart for deploying a simple NGINX-based web application (mywebapp) into a Kubernetes cluster using GitHub Actions for CI/CD and GitHub Pages to host the chart as a Helm repository.

🧱 Repository Structure

mywebapp_helm/
├── charts/
│   ├── index.yaml                          # Helm chart index
│   ├── mywebapp/                           # Helm chart directory
│   │   ├── Chart.yaml
│   │   ├── values.yaml
│   │   ├── app/index.html                  # Static web content
│   │   └── templates/                      # Kubernetes manifest templates
│   │       ├── configmap.yaml
│   │       ├── deployment.yaml
│   │       ├── ingress.yaml
│   │       ├── service.yaml
│   │       └── _helpers.tpl
├── .github/workflows/
│   └── helm-release.yaml                   # GitHub Actions workflow
└── README.md

🚀 Features

⚙️ Prerequisites

📦 Packaging the Chart

cd charts/
helm package mywebapp
helm repo index . --url https://ibrahim88ku.github.io/mywebapp

🌐 GitHub Pages Setup

  1. Switch to gh-pages branch:
    git checkout gh-pages
    
  2. Move Helm package and index.yaml to the root:
    cp charts/index.yaml charts/mywebapp-<version>.tgz .
    
  3. Commit and push:
    git add index.yaml mywebapp-<version>.tgz
    git commit -m "Release Helm chart version <version>"
    git push origin gh-pages
    

Ensure GitHub Pages is enabled in repository settings:

✅ CI/CD Workflow

The GitHub Actions workflow .github/workflows/helm-release.yaml:

📥 Installing the Helm Chart

Add the repo:

helm repo add mywebapp https://ibrahim88ku.github.io/mywebapp
helm repo update

Install the chart:

helm install mywebapp mywebapp/mywebapp --version 0.1.5 -n staging --create-namespace

Or upgrade an existing release:

helm upgrade mywebapp mywebapp/mywebapp --version 0.1.5 -n staging

🔧 Customizing Values

Example in values.yaml:

ingress:
  enabled: true
  className: nginx
  hosts:
    - host: mywebapp.local
      paths:
        - path: /
          pathType: Prefix

👨‍💻 Author

Ibrahim Khalil
GitHub: @ibrahim88ku

📝 License

This project is licensed under the MIT License.