This commit is contained in:
Emma Ruby 2024-08-18 19:11:40 +01:00
parent b63d7e778d
commit 7e6684e4a1
2 changed files with 23 additions and 4 deletions

View File

@ -21,14 +21,14 @@ spec:
- containerPort: 80 - containerPort: 80
name: http name: http
volumeMounts: volumeMounts:
- name: tmpfs_cache - name: tmpfscache
mountPath: /cache mountPath: /cache
- name: nginx_config - name: nginxconfig
mountPath: /etc/nginx mountPath: /etc/nginx
readOnly: true readOnly: true
volumes: volumes:
- name: tmpfs_cache - name: tmpfscache
emptyDir: {} emptyDir: {}
- name: nginx_config - name: nginxconfig
configMap: configMap:
name: mirror-proxy-cfg name: mirror-proxy-cfg

19
Proxy-Cache/cfgmap.yaml Normal file
View File

@ -0,0 +1,19 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: mirror-proxy-cfg
data:
nginx.conf: |
http {
# Define caching path and zone
proxy_cache_path /cache levels=1:2 keys_zone=my_cache:10m max_size=10g inactive=60m;
server {
# ...
location / {
proxy_cache my_cache;
proxy_pass http://mirror.0xem.ma; # Replace with your actual upstream server
}
}
}