apps(static-websites): Added static-websites to deployment, and cerclemagique.ca as an available target

This commit is contained in:
2025-05-30 16:36:00 +02:00
parent 1b422b218e
commit c13286924e
5 changed files with 103 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
http://cerclemagique.ca {
root * /srv/prettysunflower-staticwebsites/cerclemagique.ca
file_server
}

View File

@@ -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

View File

@@ -0,0 +1,8 @@
resources:
- deployment.yaml
- pvc.yaml
- services.yaml
configMapGenerator:
- name: static-websites-caddy-config
files:
- Caddyfile

View File

@@ -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

View File

@@ -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