diff --git a/Proxy-Cache/caching-pod.yaml b/Proxy-Cache/caching-pod.yaml index 47ac555..411b83d 100644 --- a/Proxy-Cache/caching-pod.yaml +++ b/Proxy-Cache/caching-pod.yaml @@ -21,14 +21,14 @@ spec: - containerPort: 80 name: http volumeMounts: - - name: tmpfs_cache + - name: tmpfscache mountPath: /cache - - name: nginx_config + - name: nginxconfig mountPath: /etc/nginx readOnly: true volumes: - - name: tmpfs_cache + - name: tmpfscache emptyDir: {} - - name: nginx_config + - name: nginxconfig configMap: name: mirror-proxy-cfg diff --git a/Proxy-Cache/cfgmap.yaml b/Proxy-Cache/cfgmap.yaml new file mode 100644 index 0000000..ac57271 --- /dev/null +++ b/Proxy-Cache/cfgmap.yaml @@ -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 + } + } + } +