works?
This commit is contained in:
parent
b63d7e778d
commit
7e6684e4a1
@ -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
19
Proxy-Cache/cfgmap.yaml
Normal 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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user