From 26c057da0d73adb9546a6e464d79208e31b28cc9 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 7 Aug 2025 09:21:55 +0300 Subject: convert to helm chart --- .../helm-chart/templates/apache-deployment.yaml | 21 ++++++++++++ .../helm-chart/templates/apache-ingress.yaml | 40 ++++++++++++++++++++++ .../helm-chart/templates/apache-service.yaml | 16 +++++++++ 3 files changed, 77 insertions(+) create mode 100644 f3s/example-apache/helm-chart/templates/apache-deployment.yaml create mode 100644 f3s/example-apache/helm-chart/templates/apache-ingress.yaml create mode 100644 f3s/example-apache/helm-chart/templates/apache-service.yaml (limited to 'f3s/example-apache/helm-chart/templates') diff --git a/f3s/example-apache/helm-chart/templates/apache-deployment.yaml b/f3s/example-apache/helm-chart/templates/apache-deployment.yaml new file mode 100644 index 0000000..364de1d --- /dev/null +++ b/f3s/example-apache/helm-chart/templates/apache-deployment.yaml @@ -0,0 +1,21 @@ +# Apache HTTP Server Deployment +apiVersion: apps/v1 +kind: Deployment +metadata: + name: apache-deployment +spec: + replicas: 1 + selector: + matchLabels: + app: apache + template: + metadata: + labels: + app: apache + spec: + containers: + - name: apache + image: httpd:latest + ports: + # Container port where Apache listens + - containerPort: 80 diff --git a/f3s/example-apache/helm-chart/templates/apache-ingress.yaml b/f3s/example-apache/helm-chart/templates/apache-ingress.yaml new file mode 100644 index 0000000..aa575ed --- /dev/null +++ b/f3s/example-apache/helm-chart/templates/apache-ingress.yaml @@ -0,0 +1,40 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: apache-ingress + namespace: test + annotations: + spec.ingressClassName: traefik + traefik.ingress.kubernetes.io/router.entrypoints: web +spec: + rules: + - host: f3s.buetow.org + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: apache-service + port: + number: 80 + - host: standby.f3s.buetow.org + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: apache-service + port: + number: 80 + - host: www.f3s.buetow.org + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: apache-service + port: + number: 80 diff --git a/f3s/example-apache/helm-chart/templates/apache-service.yaml b/f3s/example-apache/helm-chart/templates/apache-service.yaml new file mode 100644 index 0000000..93b24ac --- /dev/null +++ b/f3s/example-apache/helm-chart/templates/apache-service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: apache + name: apache-service +spec: + ports: + - name: web + port: 80 + protocol: TCP + # Expose port 80 on the service + targetPort: 80 + selector: + # Link this service to pods with the label app=apache + app: apache -- cgit v1.2.3