zot middleware add
This commit is contained in:
parent
6efe79819f
commit
8459ea7058
@ -23,19 +23,12 @@ data:
|
|||||||
},
|
},
|
||||||
"accessControl": {
|
"accessControl": {
|
||||||
"repositories": {
|
"repositories": {
|
||||||
"pegasus/**": {
|
"**": {
|
||||||
"policies": [
|
"policies": [
|
||||||
{ "users": ["bstein"], "actions": ["read", "create", "update", "delete"] }
|
{ "users": ["bstein"], "actions": ["read", "create", "update", "delete"] }
|
||||||
],
|
],
|
||||||
"defaultPolicy": [],
|
"defaultPolicy": [],
|
||||||
"anonymousPolicy": []
|
"anonymousPolicy": []
|
||||||
},
|
|
||||||
"**": {
|
|
||||||
"policies": [
|
|
||||||
{ "users": ["bstein"], "actions": ["read", "create", "update", "delete"] }
|
|
||||||
],
|
|
||||||
"defaultPolicy": ["read"],
|
|
||||||
"anonymousPolicy": ["read"]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"adminPolicy": {
|
"adminPolicy": {
|
||||||
|
|||||||
@ -11,6 +11,7 @@ metadata:
|
|||||||
# traefik.ingress.kubernetes.io/router.tls.options: zot-h1only@kubernetescrd
|
# traefik.ingress.kubernetes.io/router.tls.options: zot-h1only@kubernetescrd
|
||||||
# traefik.ingress.kubernetes.io/router.middlewares: zot-zot-headers@kubernetescrd,zot-zot-buffering@kubernetescrd
|
# traefik.ingress.kubernetes.io/router.middlewares: zot-zot-headers@kubernetescrd,zot-zot-buffering@kubernetescrd
|
||||||
traefik.ingress.kubernetes.io/router.middlewares: zot-add-www-auth@kubernetescrd
|
traefik.ingress.kubernetes.io/router.middlewares: zot-add-www-auth@kubernetescrd
|
||||||
|
traefik.ingress.kubernetes.io/router.middlewares: zot-zot-resp-headers@kubernetescrd
|
||||||
spec:
|
spec:
|
||||||
ingressClassName: traefik
|
ingressClassName: traefik
|
||||||
tls:
|
tls:
|
||||||
|
|||||||
@ -34,3 +34,33 @@ spec:
|
|||||||
headers:
|
headers:
|
||||||
customResponseHeaders:
|
customResponseHeaders:
|
||||||
WWW-Authenticate: Basic realm="zot-registry"
|
WWW-Authenticate: Basic realm="zot-registry"
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
apiVersion: traefik.io/v1alpha1
|
||||||
|
kind: Middleware
|
||||||
|
metadata:
|
||||||
|
name: zot-resp-headers
|
||||||
|
namespace: zot
|
||||||
|
spec:
|
||||||
|
headers:
|
||||||
|
customResponseHeaders:
|
||||||
|
Docker-Distribution-Api-Version: "registry/2.0"
|
||||||
|
WWW-Authenticate: 'Basic realm="zot-registry"'
|
||||||
|
accessControlAllowOriginList:
|
||||||
|
- "*"
|
||||||
|
accessControlAllowCredentials: true
|
||||||
|
accessControlAllowHeaders:
|
||||||
|
- Authorization
|
||||||
|
- Content-Type
|
||||||
|
- Docker-Distribution-Api-Version
|
||||||
|
- X-Registry-Auth
|
||||||
|
accessControlAllowMethods:
|
||||||
|
- GET
|
||||||
|
- HEAD
|
||||||
|
- OPTIONS
|
||||||
|
- POST
|
||||||
|
- PUT
|
||||||
|
- PATCH
|
||||||
|
- DELETE
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user