This repository demonstrates automated Docker image building and publishing to Docker Hub using GitHub Actions.
The project contains multiple containerized services related to Kubernetes authentication and authorization, with automated CI/CD pipelines that build and push Docker images on every push to the main branch.
A GitHub Actions workflow (.github/workflows/docker-image.yml) automatically:
- Triggers on code push to the
mainbranch - Sets up Docker Buildx for multi-platform builds
- Authenticates with Docker Hub using encrypted credentials
- Caches Docker layers to optimize build times
- Builds and pushes 4 Docker images to Docker Hub:
dind- Docker-in-Docker environment with additional commandsauthn-webhook- Kubernetes authentication webhook serviceauthz-webhook- Kubernetes authorization webhook servicedirectpv-discover- DirectPV discovery tool
- authn-webhook: A simple HTTP server implementing Kubernetes token-based authentication webhook for the kube-apiserver
- authz-webhook: A simple HTTP server implementing Kubernetes authorization webhook for the kube-apiserver
- dind: Docker-in-Docker container with extended functionality
- kubectl-directpv: DirectPV discovery service for Kubernetes persistent volumes
When you push to main:
- GitHub Actions automatically triggers the workflow
- Docker images are built using the Dockerfile in each service directory
- Images are tagged with version information
- All images are pushed to Docker Hub at
victorbecerra/[service-name] - Build layers are cached to speed up subsequent builds
These components are based on exercises from "Programming with Kubernetes" (educative.io) and demonstrate webhook implementations for Kubernetes API server authentication and authorization flows.