From d62214051ded15d204ebf68ec73fa216627d3e03 Mon Sep 17 00:00:00 2001 From: Jesse Sanford <108698+jessesanford@users.noreply.github.com> Date: Wed, 19 Jun 2024 01:37:47 -0400 Subject: [PATCH] working login, push and pull from workstation Signed-off-by: Jesse Sanford <108698+jessesanford@users.noreply.github.com> --- hack/gitea/ingress.yaml.tmpl | 64 +++++++++++++++++++ .../resources/gitea/k8s/install.yaml | 64 +++++++++++++++++++ 2 files changed, 128 insertions(+) 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