httpd-git-chart
Based on official httpd image, this image adds git client and a script, that pulls static web page from a git repo.
This Helm chart deploys an Apache HTTP server that automatically pulls and serves static content from a Git repository. The container includes a cron job that periodically updates the website content.
helm repo add starwitorg https://hub.docker.com/r/starwitorg/httpd-git-chart
helm install my-httpd-git starwitorg/httpd-git-chart
helm install my-httpd-git ./helm
| Parameter | Description | Default |
|---|---|---|
image.repository | Docker image repository | starwitorg/httpd-git |
image.tag | Docker image tag | 2.4.66 |
image.pullPolicy | Image pull policy | IfNotPresent |
| Parameter | Description | Default |
|---|---|---|
repoUrl | Git repository URL to pull content from | https://codeberg.org/ztarbug/gtp-landingpage.git |
branch | Git branch to checkout | main |
cronSchedule | Cron schedule for updating content | */5 * * * * (every 5 minutes) |
replicaCount | Number of replicas | 1 |
| Parameter | Description | Default |
|---|---|---|
service.type | Kubernetes service type | ClusterIP |
service.port | Service port | 80 |
| Parameter | Description | Default |
|---|---|---|
ingress.enabled | Enable ingress | true |
ingress.className | Ingress class name | traefik |
ingress.hosts | Ingress hosts configuration | landing.cluster.local |
ingress.annotations | Ingress annotations | {} |
ingress.tls | TLS configuration | [] |
| Parameter | Description | Default |
|---|---|---|
resources | CPU/Memory resource requests/limits | {} |
nodeSelector | Node selector for pod assignment | {} |
tolerations | Tolerations for pod assignment | [] |
affinity | Affinity rules for pod assignment | {} |
helm install my-site ./helm
helm install my-site ./helm \
--set repoUrl=https://github.com/myuser/mysite.git \
--set branch=production
helm install my-site ./helm \
--set cronSchedule="0 */2 * * *" # Update every 2 hours
Create a custom-values.yaml:
repoUrl: https://github.com/myorg/website.git
branch: main
cronSchedule: "0 */1 * * *" # Every hour
ingress:
enabled: true
className: "nginx"
hosts:
- host: mysite.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: mysite-tls
hosts:
- mysite.example.com
resources:
requests:
memory: "64Mi"
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
Then install:
helm install my-site ./helm -f custom-values.yaml
The following environment variables are automatically set by the Helm chart:
REPO_URL: Git repository URLBRANCH: Git branch to checkoutCRON_SCHEDULE: Cron schedule for content updatescronSchedule to periodically update content/usr/local/apache2/htdocs//var/log/update_site.logkubectl logs deployment/my-httpd-git
kubectl exec deployment/my-httpd-git -- tail -f /var/log/update_site.log
kubectl exec deployment/my-httpd-git -- env | grep -E "REPO_URL|BRANCH|CRON_SCHEDULE"
Content type
Helm
Digest
sha256:3bf3e9cc1…
Size
3 kB
Last updated
4 months ago
helm pull oci://registry-1.docker.io/starwitorg/httpd-git-chart --version 1.0.3