diff --git a/backend-ingress.yaml b/backend-ingress.yaml new file mode 100644 index 0000000..e1d0239 --- /dev/null +++ b/backend-ingress.yaml @@ -0,0 +1,22 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: iching-backend-ingress + namespace: argocd +spec: + ingressClassName: nginx + rules: + - host: 192-168-197-2.c-one-infra.de + http: + paths: + - path: /iching/api(/|$)(.*) + pathType: ImplementationSpecific + backend: + service: + name: iching-service + port: + number: 81 + tls: + - hosts: + - 192-168-197-2.c-one-infra.de + secretName: argocd-net-tls \ No newline at end of file diff --git a/frontend-ingress.yaml b/frontend-ingress.yaml new file mode 100644 index 0000000..f18b0a4 --- /dev/null +++ b/frontend-ingress.yaml @@ -0,0 +1,24 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: iching-frontend-ingress + namespace: argocd + annotations: + nginx.ingress.kubernetes.io/rewrite-target: /$2 +spec: + ingressClassName: nginx + rules: + - host: 192-168-197-2.c-one-infra.de + http: + paths: + - path: /iching(/|$)(.*) + pathType: ImplementationSpecific + backend: + service: + name: iching-service + port: + number: 80 + tls: + - hosts: + - 192-168-197-2.c-one-infra.de + secretName: argocd-net-tls \ No newline at end of file diff --git a/frontend/event.ts b/frontend/event.ts index 321c88b..3fa0de3 100644 --- a/frontend/event.ts +++ b/frontend/event.ts @@ -2,7 +2,7 @@ function handleClick(): void { console.log("Der Button wurde geklickt!"); //alert("Hallo von TypeScript!"); - fetch("/iching/api/command", { method: "POST" }) + fetch("/api/command", { method: "POST" }) .then(res => res.text()) .then(text => console.log("Server sagt:", text)) .catch(error => console.error("Fehler:", error)); diff --git a/ingress.yaml b/old.2.ingress.yaml similarity index 100% rename from ingress.yaml rename to old.2.ingress.yaml