diff --git a/hack/gitea/ingress.yaml.tmpl b/hack/gitea/ingress.yaml.tmpl index effb6dda..e679eece 100644 --- a/hack/gitea/ingress.yaml.tmpl +++ b/hack/gitea/ingress.yaml.tmpl @@ -2,6 +2,70 @@ --- apiVersion: networking.k8s.io/v1 kind: Ingress +metadata: + name: my-gitea-path-oci-root + namespace: gitea + annotations: + nginx.ingress.kubernetes.io/proxy-body-size: 512m +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: 512m + 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 diff --git a/pkg/controllers/localbuild/resources/gitea/k8s/install.yaml b/pkg/controllers/localbuild/resources/gitea/k8s/install.yaml index d9b8bba6..6d3445a8 100644 --- a/pkg/controllers/localbuild/resources/gitea/k8s/install.yaml +++ b/pkg/controllers/localbuild/resources/gitea/k8s/install.yaml @@ -601,6 +601,70 @@ 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: 512m +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: 512m + 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