fix: Gitea | use IngressRoute instead of ingress resource
This commit is contained in:
@@ -6,7 +6,7 @@ import { Construct } from "constructs";
|
|||||||
import { KubernetesProvider } from "@cdktf/provider-kubernetes/lib/provider";
|
import { KubernetesProvider } from "@cdktf/provider-kubernetes/lib/provider";
|
||||||
|
|
||||||
import { OnePasswordSecret } from "../../utils";
|
import { OnePasswordSecret } from "../../utils";
|
||||||
import { IngressRouteTcp } from "../../utils/traefik";
|
import { IngressRoute, IngressRouteTcp } from "../../utils/traefik";
|
||||||
|
|
||||||
type GiteaServerOptions = {
|
type GiteaServerOptions = {
|
||||||
providers: {
|
providers: {
|
||||||
@@ -78,5 +78,16 @@ export class GiteaServer extends Construct {
|
|||||||
serviceName: `${options.name}-ssh`,
|
serviceName: `${options.name}-ssh`,
|
||||||
servicePort: 22,
|
servicePort: 22,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
new IngressRoute(this, "http-ingress", {
|
||||||
|
provider: kubernetes,
|
||||||
|
namespace: options.namespace,
|
||||||
|
name: options.name,
|
||||||
|
entryPoints: ["websecure"],
|
||||||
|
host: "git.dogar.dev",
|
||||||
|
serviceName: `${options.name}-http`,
|
||||||
|
servicePort: 3000,
|
||||||
|
tlsSecretName: `${options.name}-tls`,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,21 +10,7 @@ service:
|
|||||||
annotations:
|
annotations:
|
||||||
metallb.universe.tf/allow-shared-ip: gitea
|
metallb.universe.tf/allow-shared-ip: gitea
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: false
|
||||||
annotations:
|
|
||||||
cert-manager.io/cluster-issuer: cloudflare-issuer
|
|
||||||
cert-manager.io/acme-challenge-type: dns01
|
|
||||||
cert-manager.io/private-key-size: 4096
|
|
||||||
className: traefik
|
|
||||||
hosts:
|
|
||||||
- host: git.dogar.dev
|
|
||||||
paths:
|
|
||||||
- path: /
|
|
||||||
pathType: Prefix
|
|
||||||
tls:
|
|
||||||
- secretName: gitea-tls
|
|
||||||
hosts:
|
|
||||||
- git.dogar.dev
|
|
||||||
gitea:
|
gitea:
|
||||||
podAnnotations:
|
podAnnotations:
|
||||||
prometheus.io/scrape: "true"
|
prometheus.io/scrape: "true"
|
||||||
|
|||||||
Reference in New Issue
Block a user