Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #327: OCI Registry for use with path-based-routing #313

Merged
merged 2 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 67 additions & 3 deletions hack/gitea/ingress.yaml.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,75 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-gitea-path-oci-root
namespace: gitea
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 1024m
spec:
ingressClassName: nginx
rules:
- host: {{ .IngressHost }}
http:
paths:
- backend:
service:
name: my-gitea-http
port:
number: 3000
path: /v2
pathType: Prefix
- host: localhost
http:
paths:
- backend:
service:
name: my-gitea-http
port:
number: 3000
path: /v2
pathType: Prefix
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-gitea-path-oci-repo
namespace: gitea
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 1024m
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /v2/$2
spec:
ingressClassName: nginx
rules:
- host: {{ .IngressHost }}
http:
paths:
- backend:
service:
name: my-gitea-http
port:
number: 3000
path: /v2/gitea(/|$)(.*)
pathType: ImplementationSpecific
- host: localhost
http:
paths:
- backend:
service:
name: my-gitea-http
port:
number: 3000
path: /v2/gitea(/|$)(.*)
pathType: ImplementationSpecific
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-gitea-path
namespace: gitea
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 512m
nginx.ingress.kubernetes.io/proxy-body-size: 1024m
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
Expand Down Expand Up @@ -40,7 +104,7 @@ metadata:
name: my-gitea-custom
namespace: gitea
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 512m
nginx.ingress.kubernetes.io/proxy-body-size: 1024m
spec:
ingressClassName: nginx
rules:
Expand All @@ -61,7 +125,7 @@ kind: Ingress
metadata:
name: my-gitea
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 512m
nginx.ingress.kubernetes.io/proxy-body-size: 1024m
spec:
ingressClassName: nginx
rules:
Expand Down
70 changes: 67 additions & 3 deletions pkg/controllers/localbuild/resources/gitea/k8s/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -601,11 +601,75 @@ spec:
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-gitea-path-oci-root
namespace: gitea
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 1024m
spec:
ingressClassName: nginx
rules:
- host: {{ .IngressHost }}
http:
paths:
- backend:
service:
name: my-gitea-http
port:
number: 3000
path: /v2
pathType: Prefix
- host: localhost
http:
paths:
- backend:
service:
name: my-gitea-http
port:
number: 3000
path: /v2
pathType: Prefix
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-gitea-path-oci-repo
namespace: gitea
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 1024m
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /v2/$2
spec:
ingressClassName: nginx
rules:
- host: {{ .IngressHost }}
http:
paths:
- backend:
service:
name: my-gitea-http
port:
number: 3000
path: /v2/gitea(/|$)(.*)
pathType: ImplementationSpecific
- host: localhost
http:
paths:
- backend:
service:
name: my-gitea-http
port:
number: 3000
path: /v2/gitea(/|$)(.*)
pathType: ImplementationSpecific
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-gitea-path
namespace: gitea
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 512m
nginx.ingress.kubernetes.io/proxy-body-size: 1024m
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
Expand Down Expand Up @@ -639,7 +703,7 @@ metadata:
name: my-gitea-custom
namespace: gitea
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 512m
nginx.ingress.kubernetes.io/proxy-body-size: 1024m
spec:
ingressClassName: nginx
rules:
Expand All @@ -660,7 +724,7 @@ kind: Ingress
metadata:
name: my-gitea
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 512m
nginx.ingress.kubernetes.io/proxy-body-size: 1024m
spec:
ingressClassName: nginx
rules:
Expand Down
Loading