Last active
April 21, 2018 10:09
-
-
Save xynova/a3bab878df70be0e3927d0e93a7ba541 to your computer and use it in GitHub Desktop.
AWS registry proxy config template
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: aws-registry-proxy-tpl | |
data: | |
registry.conf: |- | |
server { | |
listen 8080; | |
# http://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size | |
client_max_body_size 0; | |
chunked_transfer_encoding on; | |
location / { | |
proxy_pass "{{ .Env.DOCKER_REGISTRY_SERVER }}"; | |
proxy_set_header Host "{{ .Env.DOCKER_REGISTRY_SERVER | strings.ReplaceAll "https://" "" }}"; | |
proxy_set_header Authorization "Basic {{ base64.Encode .Env.REGISTRY_BASICAUTH }}"; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto "https"; | |
proxy_read_timeout 900; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment