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 --- f3s/example-apache/Makefile | 9 ----- f3s/example-apache/apache-deployment.yaml | 21 ------------ f3s/example-apache/apache-ingress.yaml | 40 ---------------------- f3s/example-apache/apache-service.yaml | 16 --------- f3s/example-apache/helm-chart/Chart.yaml | 5 +++ f3s/example-apache/helm-chart/README.md | 11 ++++++ .../helm-chart/templates/apache-deployment.yaml | 21 ++++++++++++ .../helm-chart/templates/apache-ingress.yaml | 40 ++++++++++++++++++++++ .../helm-chart/templates/apache-service.yaml | 16 +++++++++ 9 files changed, 93 insertions(+), 86 deletions(-) delete mode 100644 f3s/example-apache/Makefile delete mode 100644 f3s/example-apache/apache-deployment.yaml delete mode 100644 f3s/example-apache/apache-ingress.yaml delete mode 100644 f3s/example-apache/apache-service.yaml create mode 100644 f3s/example-apache/helm-chart/Chart.yaml create mode 100644 f3s/example-apache/helm-chart/README.md 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') diff --git a/f3s/example-apache/Makefile b/f3s/example-apache/Makefile deleted file mode 100644 index e56e363..0000000 --- a/f3s/example-apache/Makefile +++ /dev/null @@ -1,9 +0,0 @@ -apply: - kubectl apply -f apache-service.yaml - kubectl apply -f apache-deployment.yaml - kubectl apply -f apache-ingress.yaml - -delete: - kubectl delete -f apache-ingress.yaml - kubectl delete -f apache-service.yaml - kubectl delete -f apache-deployment.yaml diff --git a/f3s/example-apache/apache-deployment.yaml b/f3s/example-apache/apache-deployment.yaml deleted file mode 100644 index 364de1d..0000000 --- a/f3s/example-apache/apache-deployment.yaml +++ /dev/null @@ -1,21 +0,0 @@ -# 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/apache-ingress.yaml b/f3s/example-apache/apache-ingress.yaml deleted file mode 100644 index aa575ed..0000000 --- a/f3s/example-apache/apache-ingress.yaml +++ /dev/null @@ -1,40 +0,0 @@ -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/apache-service.yaml b/f3s/example-apache/apache-service.yaml deleted file mode 100644 index 93b24ac..0000000 --- a/f3s/example-apache/apache-service.yaml +++ /dev/null @@ -1,16 +0,0 @@ -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 diff --git a/f3s/example-apache/helm-chart/Chart.yaml b/f3s/example-apache/helm-chart/Chart.yaml new file mode 100644 index 0000000..6d49643 --- /dev/null +++ b/f3s/example-apache/helm-chart/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v2 +name: apache +description: A Helm chart for deploying Apache +version: 0.1.0 +appVersion: "1.0" diff --git a/f3s/example-apache/helm-chart/README.md b/f3s/example-apache/helm-chart/README.md new file mode 100644 index 0000000..8024446 --- /dev/null +++ b/f3s/example-apache/helm-chart/README.md @@ -0,0 +1,11 @@ +# Apache Helm Chart + +This chart deploys a simple Apache web server. + +## Installing the Chart + +To install the chart with the release name `my-release`, run the following command: + +```bash +helm install example-apache . +``` 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