Files
resume-site/flux/README.md

87 lines
1.9 KiB
Markdown
Raw Normal View History

# Flux Deployment for Resume Site
This directory contains Flux CD manifests for automated deployment of the resume site to Kubernetes.
## Prerequisites
1. Flux CD installed in your cluster
2. Gitea repository created and pushed
3. Harbor credentials configured
4. Docker image built and pushed to Harbor
## Setup Instructions
### 1. Update GitRepository URL
Edit `gitrepository.yaml` and replace the placeholder URL with your actual Gitea repository URL:
```yaml
url: https://your-gitea-url/username/resume-site.git
```
### 2. Build and Push Docker Image
```bash
# Login to Harbor
docker login images.caffeinetux.com
# Build the image
docker build -t images.caffeinetux.com/production/resume-site:latest .
# Push to Harbor
docker push images.caffeinetux.com/production/resume-site:latest
```
### 3. Deploy with Flux
Apply the Flux manifests to your cluster:
```bash
kubectl apply -k flux/
```
Flux will:
- Clone the Git repository
- Deploy the Helm chart from `./helm`
- Create an Ingress at https://resume.caffeinetux.com
- Automatically sync changes from Git
### 4. Verify Deployment
```bash
# Check Flux GitRepository
kubectl get gitrepository -n flux-system resume-site
# Check Flux HelmRelease
kubectl get helmrelease -n default resume-site
# Check pods
kubectl get pods -n default -l app.kubernetes.io/name=resume-site
# Check ingress
kubectl get ingress -n default
```
## Automatic Updates
Flux checks the Git repository every minute. Any changes to the `helm/` directory will trigger an automatic update of the deployment.
## Secrets
If you need to configure Harbor image pull secrets:
```bash
kubectl create secret docker-registry harbor-creds \
--docker-server=images.caffeinetux.com \
--docker-username=YOUR_USERNAME \
--docker-password=YOUR_PASSWORD \
--namespace=default
```
Then update `helm/values.yaml`:
```yaml
imagePullSecrets:
- name: harbor-creds
```