From c13286924ee556aae40cd696c199794010051706 Mon Sep 17 00:00:00 2001 From: prettysunflower Date: Fri, 30 May 2025 16:36:00 +0200 Subject: [PATCH] apps(static-websites): Added static-websites to deployment, and cerclemagique.ca as an available target --- apps/static-websites/Caddyfile | 4 +++ apps/static-websites/deployment.yaml | 35 ++++++++++++++++++++ apps/static-websites/kustomization.yaml | 8 +++++ apps/static-websites/pvc.yaml | 43 +++++++++++++++++++++++++ apps/static-websites/services.yaml | 13 ++++++++ 5 files changed, 103 insertions(+) create mode 100644 apps/static-websites/Caddyfile create mode 100644 apps/static-websites/deployment.yaml create mode 100644 apps/static-websites/kustomization.yaml create mode 100644 apps/static-websites/pvc.yaml create mode 100644 apps/static-websites/services.yaml diff --git a/apps/static-websites/Caddyfile b/apps/static-websites/Caddyfile new file mode 100644 index 0000000..13776c5 --- /dev/null +++ b/apps/static-websites/Caddyfile @@ -0,0 +1,4 @@ +http://cerclemagique.ca { + root * /srv/prettysunflower-staticwebsites/cerclemagique.ca + file_server +} diff --git a/apps/static-websites/deployment.yaml b/apps/static-websites/deployment.yaml new file mode 100644 index 0000000..136fdce --- /dev/null +++ b/apps/static-websites/deployment.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: static-websites + labels: + app.kubernetes.io/name: static-websites +spec: + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: static-websites + template: + metadata: + labels: + app.kubernetes.io/name: static-websites + spec: + volumes: + - name: prettysunflower-staticwebsites + persistentVolumeClaim: + claimName: prettysunflower-staticwebsites-pvc + - name: config + configMap: + name: static-websites-caddy-config + containers: + - image: caddy:latest + name: caddy + imagePullPolicy: Always + ports: + - containerPort: 80 + protocol: TCP + volumeMounts: + - name: prettysunflower-staticwebsites + mountPath: "/srv/prettysunflower-staticwebsites" + - name: config + mountPath: /etc/caddy diff --git a/apps/static-websites/kustomization.yaml b/apps/static-websites/kustomization.yaml new file mode 100644 index 0000000..74702e3 --- /dev/null +++ b/apps/static-websites/kustomization.yaml @@ -0,0 +1,8 @@ +resources: + - deployment.yaml + - pvc.yaml + - services.yaml +configMapGenerator: +- name: static-websites-caddy-config + files: + - Caddyfile \ No newline at end of file diff --git a/apps/static-websites/pvc.yaml b/apps/static-websites/pvc.yaml new file mode 100644 index 0000000..9f38d33 --- /dev/null +++ b/apps/static-websites/pvc.yaml @@ -0,0 +1,43 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: prettysunflower-staticwebsites-pv +spec: + storageClassName: s3yuyuko + capacity: + storage: 10T + accessModes: + - ReadOnlyMany + claimRef: + namespace: default + name: prettysunflower-staticwebsites-pvc + csi: + driver: ru.yandex.s3.csi + controllerPublishSecretRef: + name: csi-tigris-secret + namespace: kube-system + nodePublishSecretRef: + name: csi-tigris-secret + namespace: kube-system + nodeStageSecretRef: + name: csi-tigris-secret + namespace: kube-system + volumeAttributes: + capacity: 10Ti + mounter: geesefs + options: --memory-limit 1000 --dir-mode 0777 --file-mode 0666 + volumeHandle: prettysunflower-staticwebsites +--- +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: prettysunflower-staticwebsites-pvc +spec: + storageClassName: "s3yuyuko" + resources: + requests: + storage: 10Ti + volumeMode: Filesystem + accessModes: + - ReadOnlyMany + volumeName: prettysunflower-staticwebsites-pv \ No newline at end of file diff --git a/apps/static-websites/services.yaml b/apps/static-websites/services.yaml new file mode 100644 index 0000000..e2fc63e --- /dev/null +++ b/apps/static-websites/services.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Service +metadata: + name: static-websites +spec: + type: ClusterIP + selector: + app.kubernetes.io/name: static-websites + ports: + - protocol: TCP + port: 80 + targetPort: 80 + name: http \ No newline at end of file